/*
 Navicat Premium Data Transfer

 Source Server         : mysql-lqd
 Source Server Type    : MySQL
 Source Server Version : 80019
 Source Host           : localhost:3306
 Source Schema         : api-egg

 Target Server Type    : MySQL
 Target Server Version : 80019
 File Encoding         : 65001

 Date: 06/05/2022 17:30:53
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
  `id` int NOT NULL AUTO_INCREMENT,
  `top` tinyint NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `category_id` bigint DEFAULT NULL,
  `user_id` bigint NOT NULL,
  `cover_img` varchar(255) DEFAULT NULL,
  `cover_type` tinyint DEFAULT '0',
  `comment_count` bigint NOT NULL DEFAULT '0',
  `like_count` bigint NOT NULL DEFAULT '0',
  `read_count` bigint NOT NULL DEFAULT '0',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:草稿;1:审核中;2:审核通过;3:回收站)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article
-- ----------------------------
BEGIN;
INSERT INTO `article` VALUES (1, 0, 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 4, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, 0, 0, 0, 1, '2022-02-25 10:36:37', '2022-02-25 10:36:37', '2022-02-25 13:24:18');
INSERT INTO `article` VALUES (2, 0, 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', '<p><strong>ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程</strong></p>', 5, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, 0, 0, 9, 1, '2022-02-25 11:23:10', '2022-03-06 15:06:11', NULL);
INSERT INTO `article` VALUES (3, 0, 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 4, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, 0, 0, 21, 2, '2022-02-25 11:51:15', '2022-03-28 12:13:11', NULL);
INSERT INTO `article` VALUES (5, 0, '4ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 4, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, -2, 0, 34, 0, '2022-02-25 11:57:04', '2022-04-19 15:19:27', NULL);
INSERT INTO `article` VALUES (6, 0, '4ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 'ElementUI源码系列一 - 从零搭建项目架构，项目准备、项目打包、项目测试流程', 4, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, 5, 0, 66, 1, '2022-02-25 12:14:02', '2022-04-21 14:53:10', NULL);
INSERT INTO `article` VALUES (44, 0, '测试', '<p>11</p>', 5, 2, 'http://127.0.0.1:8001/public/upload/20220305/1646458606243.png', 3, -9, 0, 33, 1, '2022-03-05 09:31:27', '2022-04-19 15:43:59', NULL);
INSERT INTO `article` VALUES (45, 0, 'H5画布 canvas 入门到精通 _ 第一部分(canvas简介、绘制圆形/矩形、案例饼状图绘制)', '<p>1. canvas 简介</p><p>        canvas 是HTML5 提供的一种新标签 &lt;canvas&gt;&lt;/canvas&gt;，与 div 类似，是一个矩形的画布，它可以支持 JavaScript 在上面绘画，控制每一个像素；canvas 拥有多种绘制路径、矩形、圆形、字符以及添加图像的方法，可以使得页面更加丰富多彩。当前 canvas 广泛应用于游戏、可视化数据(echarts)、广告等领域。</p><p>2. canvas 标签介绍</p><p>        canvas 其实就是一个普通的 HTML 标签，需要进行闭合，可以设置宽高、背景色属性，但宽高单位必须是 px，否则就会被忽略；一个 canvas 默认为 300*150 像素。</p><p>        需要注意 canvas 元素的宽高必须使用它自带的属性进行设置，而不要用 CSS 选择器控制 canvas 的宽高，否则会造成图像拉伸，除宽高之外的其余属性则可用 CSS。如下简单案例：</p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p> </p><p>&lt;head&gt;</p><p>  &lt;meta charset=\"UTF-8\"&gt;</p><p>  &lt;title&gt;canvas标签&lt;/title&gt;</p><p>  &lt;style&gt;</p><p>    #can1 {</p><p>      background-color: cadetblue;</p><p>      border: 2px solid red;</p><p>    }</p><p>  &lt;/style&gt;</p><p>&lt;/head&gt;</p><p> </p><p>&lt;body&gt;</p><p>  &lt;!-- 设置宽高使用canvas标签的属性 --&gt;</p><p>  &lt;canvas id=\"can1\" width=\"300px\" height=\"150px\"&gt;&lt;/canvas&gt;</p><p>&lt;/body&gt;</p><p> </p><p>&lt;/html&gt;</p><p>效果如下：</p><p>3. canvas 上下文 Context</p><p>        Context 是 canvas 的上下文，也就是绘制环境，它是所有绘制操作 api 的入口或者集合；canvas 本身是无法绘制任何内容的，需要使用 JavaScript 进行操作。而 Context 正是 JavaScript 操作 canvas 的接口。</p><p>获取上下文分为两步：首先获取 canvas 标签，然后再获取该标签的上下文；</p><p>&lt;script&gt;</p><p>  // 1.DOM操作获取canvas标签</p><p>  var canvas = document.getElementById(\'can1\');</p><p>  // 2.获取canvas的上下文（2d渲染）</p><p>  var ctx = canvas.getContext(\'2d\');</p><p>&lt;/script&gt;</p><p>获取 canvas 上下文之后，就可以在画布上进行图形绘制了；上下文 Context 相关属性如下：</p><p>（ctx 是博主定义的获取到的上下文 Context 的变量名，可以随意更换，以下介绍都用ctx）</p><p>ctx.moveTo(x,y)；将画笔移动到坐标(x,y)位置</p><p>ctx.lineTo(x,y)；从当前位置绘制直线到坐标(x,y)位置</p><p>ctx.closePath()；关闭路径，闭合线条</p><p>ctx.lineWidth；线宽</p><p>ctx.strokeStyle；描边颜色，必须用于描边之前</p><p>ctx.stroke()；渲染直线，相当于描边</p><p>ctx.fillStyle；填充颜色，必须用于填充之前</p><p>ctx.fill()；填充，默认为黑色</p><p>接下来我们结合这些属性绘制一个简单的正方形：</p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p> </p><p>&lt;head&gt;</p><p>  &lt;meta charset=\"UTF-8\"&gt;</p><p>  &lt;title&gt;canvas标签&lt;/title&gt;</p><p>  &lt;style&gt;</p><p>    #can1 {</p><p>      background-color: rgb(204, 216, 216);</p><p>      border: 2px solid red;</p><p>    }</p><p>  &lt;/style&gt;</p><p>&lt;/head&gt;</p><p> </p><p>&lt;body&gt;</p><p>  &lt;!-- 设置宽高使用canvas标签的属性 --&gt;</p><p>  &lt;canvas id=\"can1\" width=\"600px\" height=\"500px\"&gt;&lt;/canvas&gt;</p><p>&lt;/body&gt;</p><p> </p><p>&lt;script&gt;</p><p>  // DOM操作获取canvas标签</p><p>  var canvas = document.getElementById(\'can1\');</p><p>  // 获取canvas的上下文（2d渲染）</p><p>  var ctx = canvas.getContext(\'2d\');</p><p>  // 绘制长方形</p><p>  ctx.moveTo(100, 100); //将画笔移动到坐标 100 100</p><p>  ctx.lineTo(200, 100); //从画笔位置绘制直线到坐标 200 100</p><p>  ctx.lineTo(200, 200); //从当前位置绘制直线到 200 200</p><p>  ctx.lineTo(100, 200); //.从当前位置...</p><p>  ctx.closePath(); //闭合线条</p><p> </p><p>  ctx.lineWidth = 6; //线宽</p><p> </p><p>  ctx.strokeStyle = \'red\'; //描边颜色</p><p>  ctx.stroke(); //渲染直线(描边)</p><p> </p><p>  ctx.fillStyle = \'blue\'; //填充颜色</p><p>  ctx.fill(); //填充</p><p>&lt;/script&gt;</p><p> </p><p>&lt;/html&gt;</p><p>效果如下：</p><p>4. 案例：在 canvas 画布中绘制表格</p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p> </p><p>&lt;head&gt;</p><p>  &lt;meta charset=\"UTF-8\"&gt;</p><p>  &lt;title&gt;案例：绘制表格&lt;/title&gt;</p><p>  &lt;style&gt;&lt;/style&gt;</p><p>&lt;/head&gt;</p><p> </p><p>&lt;body&gt;</p><p>  &lt;div&gt;</p><p>    &lt;canvas id=\"table\"&gt;&lt;/canvas&gt;</p><p>  &lt;/div&gt;</p><p>&lt;/body&gt;</p><p>&lt;script&gt;</p><p>  (function () {</p><p>    var canvas = document.getElementById(\'table\'); //获取canvas标签</p><p>    var ctx = canvas.getContext(\'2d\'); //获取上下文</p><p> </p><p>    //设置画布宽高、边框（边框也可使用CSS选择器来设定）</p><p>    canvas.width = 600;</p><p>    canvas.height = 400;</p><p>    canvas.style.border = \'2px solid #000\';</p><p>    //设置上下文样式</p><p>    ctx.lineWidth = .5;</p><p>    ctx.strokeStyle = \'#999\';</p><p> </p><p>    //绘制表格</p><p>    var rect_hei = 20; //定义每一行高20px</p><p>    var rect_wit = 40; //定义每一列宽40px</p><p> </p><p>    for (var i = 0; i &lt; canvas.width / rect_hei; i++) { //循环绘制</p><p>      //绘制横线</p><p>      ctx.moveTo(0, i * rect_hei); //从x轴为0的位置开始，每隔一个行高便绘制横线</p><p>      ctx.lineTo(canvas.width, i * rect_hei);</p><p>      ctx.stroke();</p><p> </p><p>      //绘制竖线</p><p>      ctx.moveTo(i * rect_wit, 0); //从y轴为0的位置开始，每隔一个列宽便绘制竖线</p><p>      ctx.lineTo(i * rect_wit, canvas.height);</p><p>      ctx.stroke();</p><p>    }</p><p>  }())</p><p>&lt;/script&gt;</p><p> </p><p>&lt;/html&gt;</p><p>效果如下：</p><p>5. canvas 的 beginPath 状态</p><p>        需要知道，在 canvas 画布中绘制图形是基于状态的，意思就是说如果前面已经设置了描边颜色属性 strokeStyle 为某个颜色，那么在这之后的绘制当中，所有线条都会是这个颜色；如果再次设置描边颜色，则所有线条都会成为最新设置的颜色，前面设置的都被覆盖，无法做到颜色不一。如下：</p><p>而这个时候，为了能够绘制出不同颜色的线条，就需要使用到 beginPath 开启新状态；</p><p>ctx.beginPath()；开启新状态的绘图，前面的设置不会被覆盖；新状态可以继承之前状态的样式，但是在新状态中设置的样式就只能作用在新状态当中。</p><p>如下案例：</p><p>6. 绘制矩形 rect</p><p>        如果只是按照步骤：起点 --&gt; 画线 --&gt; 描边 一步一步的绘制一个矩形的话，就太麻烦了，canvas 也提供了一种快速绘制矩形的方法 rect，并且提供了各种属性。语法如下：</p><p>ctx.rect(x, y, width, height)；x, y为矩形左上角坐标， width 和 height 以像素 px 为单位，该语法只规定了矩形的路径，没有填充和描边。</p><p>ctx.strokeRect(x, y, width, height)；描边矩形，结合绘制与描边。</p><p>ctx.fillRect(x, y, width, height)；填充矩形，结合绘制与填充</p><p>ctx.clearRect(x, y, width, height)；清除矩形，相当于橡皮擦，在该矩形范围内的图像都会被擦除。</p><p>我们使用 rect 语法绘制一个矩形，只需一句代码即可：</p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p> </p><p>&lt;head&gt;</p><p>  &lt;meta charset=\"UTF-8\"&gt;</p><p>  &lt;title&gt;绘制矩形&lt;/title&gt;</p><p>  &lt;style&gt;&lt;/style&gt;</p><p>&lt;/head&gt;</p><p> </p><p>&lt;body&gt;</p><p>  &lt;div&gt;</p><p>    &lt;canvas id=\"table\"&gt;&lt;/canvas&gt;</p><p>  &lt;/div&gt;</p><p>&lt;/body&gt;</p><p>&lt;script&gt;</p><p>  var canvas = document.getElementById(\'table\'); //获取canvas标签</p><p>  var ctx = canvas.getContext(\'2d\'); //获取上下文</p><p> </p><p>  //设置画布宽高、边框（边框也可使用CSS选择器来设定）</p><p>  canvas.width = 600;</p><p>  canvas.height = 400;</p><p>  canvas.style.border = \'2px solid #000\';</p><p> </p><p>  //快速绘制矩形</p><p>  ctx.rect(100, 100, 50, 50);</p><p>  ctx.stroke();</p><p> </p><p>  //描边矩形</p><p>  ctx.strokeRect(200, 100, 50, 50);</p><p> </p><p>  //填充矩形</p><p>  ctx.fillRect(300, 100, 50, 50);</p><p>&lt;/script&gt;</p><p> </p><p>&lt;/html&gt;</p><p>效果如下：</p><p>7. 绘制圆形 arc</p><p>ctx.arc(x,y,r,sAngle,eAngle,counterclockwise)；x、y 为圆心点坐标；r 半径；sAngle 开始角度，圆心到最右边点为 0 度，顺时针方向依次增大；eAngle 结束角度，注意用的是弧度 Π(180°)；counterclockwise：是否是逆时针，true 是逆时针，false 顺时针。</p><p>接下来，我们使用 arc 绘制一个圆弧，效果如下：</p><p>（提示：弧度与角度的转换公式，角度 = 度数 * Math.PI / 180）</p><p>8. 案例：根据一组数据绘制饼状图</p><p>&lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p> </p><p>&lt;head&gt;</p><p>  &lt;meta charset=\"UTF-8\"&gt;</p><p>  &lt;title&gt;绘制饼状图&lt;/title&gt;</p><p>  &lt;style&gt;&lt;/style&gt;</p><p>&lt;/head&gt;</p><p> </p><p>&lt;body&gt;</p><p>  &lt;div&gt;</p><p>    &lt;canvas id=\"table\"&gt;&lt;/canvas&gt;</p><p>  &lt;/div&gt;</p><p>&lt;/body&gt;</p><p>&lt;script&gt;</p><p>  var canvas = document.getElementById(\'table\'); //获取canvas标签</p><p>  var ctx = canvas.getContext(\'2d\'); //获取上下文</p><p> </p><p>  //设置画布宽高、边框（边框也可使用CSS选择器来设定）</p><p>  canvas.width = 600;</p><p>  canvas.height = 400;</p><p>  canvas.style.border = \'2px solid #000\';</p><p> </p><p>  //定义饼状图数据</p><p>  var data = [{</p><p>      \'value\': 0.2,</p><p>      \'color\': \'#149985\',</p><p>      \'title\': \'城市A\'</p><p>    },</p><p>    {</p><p>      \'value\': 0.3,</p><p>      \'color\': \'red\',</p><p>      \'title\': \'城市B\'</p><p>    },</p><p>    {</p><p>      \'value\': 0.4,</p><p>      \'color\': \'blue\',</p><p>      \'title\': \'城市C\'</p><p>    },</p><p>    {</p><p>      \'value\': 0.1,</p><p>      \'color\': \'#999999\',</p><p>      \'title\': \'城市D\'</p><p>    },</p><p>  ]</p><p> </p><p>  //绘制饼状图</p><p>  var tempAngle = -90; //从-90°开始绘制</p><p>  for (var i = 0; i &lt; data.length; i++) {</p><p>    ctx.beginPath(); //每一次循环都绘制不同的扇区，所以都要开启新状态</p><p>    ctx.moveTo(200, 200); //每一次都回到圆心点开始绘制</p><p>    var angle = data[i].value * 360; //每一个扇区的角度</p><p>    ctx.fillStyle = data[i].color; //颜色填充按照数据遍历</p><p>    var startAngle = tempAngle * Math.PI / 180; //起始角度</p><p>    var endAngle = (tempAngle + angle) * Math.PI / 180; //每一次的结束角度=起始角度+扇区角度</p><p>    ctx.arc(200, 200, 100, startAngle, endAngle);</p><p>    tempAngle = tempAngle + angle; //每次绘制完一次扇区起始角度为原角度加该扇区角度</p><p>    ctx.fill();</p><p>  }</p><p>&lt;/script&gt;</p><p> </p><p>&lt;/html&gt;</p><p>案例效果如下：</p><p>饼状图文字的绘制等参见下期：H5画布 canvas 入门到精通 _ 第二部分</p><p>小结：canvas 绘制基本步骤</p><p>获得上下文：canvas.getContext(\'2d\')</p><p>开始新状态绘制：ctx.beginPath()</p><p>画笔起始点：ctx.moveTo(x, y)</p><p>绘制线：ctx.lineTo(x, y)</p><p>闭合路径：ctx.closePath()</p><p>描边：ctx.stroke()</p><p></p>', 5, 1, 'http://127.0.0.1:8001/public/upload/20220305/1646458255027.jpg', 3, -1, 0, 95, 1, '2022-03-05 09:36:53', '2022-04-22 08:59:13', NULL);
INSERT INTO `article` VALUES (46, 0, '推荐一款前后端协作开发神器ApiPost：Postman+Swagger+Mock的复合体', '<p>大家好，我是路飞！今天这篇文章，给大家介绍一款非常好用的国内软件自研发的开发辅助软件 ApiPost！</p><p>作为一个名服务端开发者，我们在日常工作中离不开接口测试、接口文档编写、Mock 数据测试、前后端接口联调。为了完成这些任务，我们经常需要用到 Postman、Swagger、Mock Js等等，而今天这款软件是恰好包含了这三者所有的功能，以及额外的扩展功能！</p><p>ApiPost = Postman + Swagger + Mock</p><p>一、什么是ApiPost？</p><p>1、介绍</p><p>官网地址：apipost.cn</p><p>ApiPost是一款将接口调试+接口文档快速生成+接口文档规范化管理+Mock API+接口流程测试集成一体的辅助开发软件。</p><p>ApiPost产生的初衷是为了提高研发团队各个角色的效率！产品的使用受众为由前端开发、后端开发和测试人员以及技术经理组成的整个研发技术团队。</p><p>2、面向的用户群体</p><p>前端开发人员：支持接口文档预览、接口Mock数据、接口调试、前端代码自动生成。</p><p>后端开发人员：支持接口文档自动生成、支持接口文档测试调用。</p><p>测试开发人员：支持接口调试、接口自动化测试。</p><p>研发经理：规范接口文档管理、提升整体研发团队效率。</p><p>二、ApiPost下载与安装</p><p>1、下载</p><p>下载地址：<a href=\"https://www.apipost.cn/download.html\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">https://www.apipost.cn/download.html</a></p><p>选择合适自己电脑操作系统的安装包下载即可，这里我简单演示一下Mac和Windows电脑上的安装流程。</p><p>2、安装</p><p>2.1、Mac上安装</p><p>我的办公电脑是M1芯片的MacOS系统，所以这里选择下载 Mac 客户端（arm64，适配M1芯片） 。dmg结尾的安装包下载完毕后，直接双击运行即可安装：</p><p>2.2、Windows上安装</p><p>Windows电脑上我选择 Window 64位 客户端 ，下载完毕后直接运行exe文件即可。</p><p>安装完成后，我们来简单实操一下ApiPost的一些常用功能！</p><p>三、ApiPosts实操</p><p>官方帮助文档：APIPOST 使用文档</p><p>1、HTTP请求接口（获取天气预报信息）</p><p>ApiPost在测试请求接口时，和Postman一样，主要注意下面几个部分的参数配置即可：</p><p>Header 参数：可以设置或者导入 Header 参数，cookie也在Header进行设置。</p><p>Query 参数：Query 支持构造URL参数，同时支持 RESTful 的 PATH 参数（如:id）。</p><p>Body 参数：Body 提供三种类型 form-data / x-www-form-urlencoded / raw ，每种类型提供三种不同的UI界面。这三者分别对应提交表单参数、提交有文件的表单参数、发送JSON对象或者其他对象。</p><p>这里简单测试一下查询所在城市天气信息的天气预报接口调用：</p><p><a href=\"http://apis.juhe.cn/simpleWeather/query?city=\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">http://apis.juhe.cn/simpleWeather/query?city=</a>杭州&amp;key=351e0xxxxxxxxxxxxxx8b266</p><p>1</p><p>完整的请求结果如下：</p><p>{</p><p>	\"reason\": \"查询成功!\",</p><p>	\"result\": {</p><p>		\"city\": \"杭州\",</p><p>		\"realtime\": {</p><p>			\"temperature\": \"14\",</p><p>			\"humidity\": \"55\",</p><p>			\"info\": \"晴\",</p><p>			\"wid\": \"00\",</p><p>			\"direct\": \"东风\",</p><p>			\"power\": \"3级\",</p><p>			\"aqi\": \"140\"</p><p>		},</p><p>		\"future\": [</p><p>			{</p><p>				\"date\": \"2022-02-27\",</p><p>				\"temperature\": \"8/14℃\",</p><p>				\"weather\": \"晴转多云\",</p><p>				\"wid\": {</p><p>					\"day\": \"00\",</p><p>					\"night\": \"01\"</p><p>				},</p><p>				\"direct\": \"东风转持续无风向\"</p><p>			},</p><p>			{</p><p>				\"date\": \"2022-02-28\",</p><p>				\"temperature\": \"9/20℃\",</p><p>				\"weather\": \"多云转小雨\",</p><p>				\"wid\": {</p><p>					\"day\": \"01\",</p><p>					\"night\": \"07\"</p><p>				},</p><p>				\"direct\": \"持续无风向转西北风\"</p><p>			},</p><p>			{</p><p>				\"date\": \"2022-03-01\",</p><p>				\"temperature\": \"7/15℃\",</p><p>				\"weather\": \"小雨\",</p><p>				\"wid\": {</p><p>					\"day\": \"07\",</p><p>					\"night\": \"07\"</p><p>				},</p><p>				\"direct\": \"西北风转持续无风向\"</p><p>			},</p><p>			{</p><p>				\"date\": \"2022-03-02\",</p><p>				\"temperature\": \"7/17℃\",</p><p>				\"weather\": \"晴转阴\",</p><p>				\"wid\": {</p><p>					\"day\": \"00\",</p><p>					\"night\": \"02\"</p><p>				},</p><p>				\"direct\": \"持续无风向\"</p><p>			},</p><p>			{</p><p>				\"date\": \"2022-03-03\",</p><p>				\"temperature\": \"8/14℃\",</p><p>				\"weather\": \"小雨转小到中雨\",</p><p>				\"wid\": {</p><p>					\"day\": \"07\",</p><p>					\"night\": \"21\"</p><p>				},</p><p>				\"direct\": \"持续无风向\"</p><p>			}</p><p>		]</p><p>	},</p><p>	\"error_code\": 0</p><p>}</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>30</p><p>31</p><p>32</p><p>33</p><p>34</p><p>35</p><p>36</p><p>37</p><p>38</p><p>39</p><p>40</p><p>41</p><p>42</p><p>43</p><p>44</p><p>45</p><p>46</p><p>47</p><p>48</p><p>49</p><p>50</p><p>51</p><p>52</p><p>53</p><p>54</p><p>55</p><p>56</p><p>57</p><p>58</p><p>59</p><p>60</p><p>61</p><p>62</p><p>63</p><p>64</p><p>65</p><p>66</p><p>67</p><p>68</p><p>2、使用ApiPost发送请求给自己的博客文章点赞</p><p>操作步骤：</p><p>1、点赞请求URL：<a href=\"https://blog.csdn.net//phoenix/web/v1/article/like\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">https://blog.csdn.net//phoenix/web/v1/article/like</a></p><p>2、请求类型：POST</p><p>3、设置Cookie：在文章列表页F12打开控制台，拷贝请求Cookie信息。</p><p>3、Body请求参数：articleId: 122262651</p><p>从上面两个案例，可以看到，ApiPost在接口测试、接口调用方面相比于纯英的Postman，对国内开发者友好很多，而且在一些使用细节上既保留了Postman原有开发者用户的操作习惯，还在原来基础上增加了很多新的功能。</p><p>那么，ApiPost就只是一个增强版的Postman吗？</p><p>肯定不是呀，下面我们来康康使用ApiPost如何快速一键生成接口文档！</p><p>3、一键生成接口文档</p><p>我们知道，在前后端协作开发时，接口文档是必须要的。而接口文档的编写任务往往交给后端同学去负责，需要给出接口的各种参数要求以及参考实例等等，非常繁琐。</p><p>为了前后端协作便利，很多公司使用 Swagger 作为接口文档生成工具，嵌套在后端服务中，当后端开发着完成后端接口编写，就可以自动生成接口文档。</p><p>但是 Swagger 需要在后端模块添加额外的 Swagger 集成代码。而 ApiPost 刚好可以把 Swagger 和 Postman 二者的功能合二为一，对开发者带来极大的便利性！如下图所示：</p><p>点击分享文档/分享项目查看自动生成的接口文档：</p><p>文档如下所示：</p><p>4、Mock</p><p>ApiPost 可以让前端开发者在没有后端程序的情况下能真实地返回接口数据，可以用 ApiPost 实现项目初期纯前端的效果演示，也可以用 ApiPost 实现开发中的数据模拟从而实现前后端分离。</p><p>官方文档：ApiPost中使用Mock</p><p>编写mock规则：</p><p>Mock 规则模板支持类型丰富（5.4版本起）。</p><p>基本数据(固定json结构)</p><p>{</p><p>  \"code\": \"0\",</p><p>  \"data\": {</p><p>    \"name\": \"张三丰\",</p><p>    \"age\": 100</p><p>  },</p><p>  \"desc\": \"成功\"</p><p>}</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>基本数据(Mock随机json结构)</p><p>{</p><p>  \"code\": \"0\",</p><p>  \"data\": {</p><p>    \"list|20\": [{</p><p>      \"name\": \"@name\",</p><p>      \"age\": \"@integer(2)\"</p><p>    }],</p><p>    \"url\": \"<a href=\"https://echo.apipost.cn\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">https://echo.apipost.cn</a>\"</p><p>  },</p><p>  \"desc\": \"成功\"</p><p>}</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>如图所示：</p><p>将生成的mock URL地址发给前端：</p><p>这样前端就可以使用您模拟的数据进行先一步的调试开发了。当您的接口完成后，再替换回来即可。</p><p>注：APIPOST的 mock 是基于mock.js 开发的。具体文档可以 参见 mock.js 详细文档。</p><p>5、全局参数和目录参数设置</p><p>5.1、全局参数</p><p>在实际项目中，对于一批接口，往往具有相同的请求参数。此时，我们可以利用全局参数或者目录参数实现。</p><p>例如：常见的token令牌参数，假使我们请求项目下的任何接口都需要在header带上token参数，那么我们当然可以每个接口的header参数都写一个token，但是这样的话十分不利于后期维护、修改。</p><p>打开全局参数管理器，在全局header填上token参数：</p><p>那么我们每次发送接口，都会在请求header中自动带上该参数：</p><p>全局query和全局body的使用方法跟全局header类似，不再赘述。</p><p>5.2、目录参数</p><p>目录参数的作用和全局参数雷同，只是作用域不一样，B目录下的接口不会使用同级的A目录的目录参数作为发送参数。</p><p>我们可以通过编辑目录进行目录参数的填写：</p><p>那么我们每次发送该目录下的接口，都会在请求header中自动带上该参数：</p><p>5.3、参数的优先级</p><p>当全局参数、目录参数、接口中都使用了同一个参数时，最终会按照以下优先级读取参数值：</p><p>单个接口 &gt; 目录参数 &gt; 全局参数</p><p>如上面的示例，如果全局参数、目录参数、接口中都定义了header参数token：</p><p>全局参数：token值为：698d51a19d8a121ce581499d7b701668 // 最低优先级</p><p>目录参数：token值为：b50e345cc9febd86dedecc551ebcc505 // 其次优先级</p><p>单接口参数：token值为：a1a9db893bb8a28ccb665d2af54d9417 // 最高优先级</p><p>那么最终发送的token值为：a1a9db893bb8a28ccb665d2af54d9417</p><p>6、流程测试</p><p>流程测试是针对一个接口集合的测试，选择相应的环境，可以作为一系列请求一起运行。点击开始，接口集合会并发的像服务器发出请求，最后会按照定义好的测试校验模块给出测试结果。</p><p>6.1、流程测试过程</p><p>创建一个流程测试需要如下步骤：</p><p>1、新建接口，并添加断言</p><p>2、打开流程测试，新建一个流程</p><p>3、向流程添加测试接口</p><p>4、选择环境，点击开始测试</p><p>5、查看返回的测试接口</p><p>流程测试界面如下图：</p><p>6.2、查看流程测试中单个接口的信息</p><p>通过点击接口名称查看请求的请求和响应参数信息。</p><p>总结</p><p>除了上面总结的一些常用功能，ApiPost还支持其他一些功能，比如：</p><p>接口回收站</p><p>自动生成代码</p><p>多人协作管理</p><p>项目管理</p><p>Cookie管理器</p><p>预执行脚本和后执行脚本</p><p>…</p><p>整体上来看 ApiPost 无论是功能种类方面还是用户体验方面都比之前用的其他软件更具优势，相当于同时把 Postman、Mock、Swagger 的功能压缩为一个开发辅助软件，真的非常 Nice，关键是完全免费提供给用户使用，白嫖党福音！</p><p>不得不说，ApiPost 相比于 Postman ，它是一款更懂中国程序员的研发协同工具。</p><p>Apipost官方已经开通企业微信社群服务，如果在使用过程中有任何问题可以直接@客服，回复速度很快，可以进群里交流技术问题或者撩客服小姐姐。</p><p>最后，也希望大家多多支持这一款很良心的国产自研发远程办公软件，希望国内软件研发生态蒸蒸日上，也希望各位老板能给博主一个三连(点赞、收藏、加关注)鼓励支持一下~，谢谢大家呀！</p>', 3, 1, 'http://127.0.0.1:8001/public/upload/20220305/1646458632384.jpeg', 1, 10, 1, 55, 1, '2022-03-05 12:04:17', '2022-04-21 14:53:12', NULL);
INSERT INTO `article` VALUES (47, 0, '1111', '<p><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/061232c80e0049f0b3d57cf39350a956~tplv-k3u1fbpfcp-zoom-crop-mark:1304:1304:1304:734.awebp?\" alt=\"Vue3+TS+Node打造个人博客（总览篇）\" title=\"\" width=\"755\" height=\"NaN\" data-display=\"inline\"></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">从 Vue3 正式发布到现在，也快过去一年了（写这行文字的时候是2021年09月08日，拖延症...）。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f0c643b01c3c44cabd6ebea8fa82b63d~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">但是就我最近招聘面试的一些经历来看，很多 Vue 技术栈的候选人依然还没有使用过 Vue3。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">关于他们没有选择使用 Vue3 这个事情，我觉得也是可以理解的。一方面，Vue3 直接放弃了 IE11。虽然 IE 的用户数量在持续下降，但是想让老板们直接放弃 IE11 还是有一些困难。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c083d736727742d7b912e7b59ef458e8~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">另外就是，做项目这种事情，有时候人们的选择就是能用就行，升级 Vue3 可能并不能给项目带来太多效益。对于一些历史悠久的项目，甚至还要考虑 Vue3 新生态是否完善的问题，是不是能够支撑自己完美过渡。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">诚然，拥抱新技术还存在着这么一些障碍，是否选择新技术需要综合去考量。但是从做技术的角度出发，我们还是要保持一个 Open 的心态，敢于去接受新鲜事物，即便短期不能直接用在工作中，也可以自己私下感受下新框架给我们带来了什么新的体验。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">早些时候，我为了更深入地了解前后端完整链路，特意自己实现了个人博客。早期效果如下：</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/238072d66bc040ab883012745c0a011c~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">之后一方面是觉得博客做得太难看，另一方面是想尝试在 Vue 项目中实践 TS，于是2020年我就立了一个 Flag 做重构，当时技术选型是 vue-class-component + vue-property-decorator，类组件 + 装饰器模式。做了一段时间，感觉开发体验也不是很好，慢慢就放弃了，等着 Vue3 的发布。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">最近也是借着一些业余时间完成了自己的一个Flag，虽然延期了很久，但总算是有了结果。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c0bf65bc541a44e385046277168fd304~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">首先分享下在线链接：</span></span><span style=\"color: rgb(2, 105, 200);\"><span style=\"font-size: 16px\"><a href=\"https://link.juejin.cn/?target=https%3A%2F%2Fblog.wbjiang.cn%2F\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">Tusi博客</a></span></span></span></p><h1 style=\"line-height: 150%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 24px\">整体架构</span></span></span></h1><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/231c24b8a2634f7dbf622f1b9bcfb0a8~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">从技术选型来看，我还是选择了一些比较接地气的框架和技术。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">其实对于博客这种 SEO 要求高的网站，优选的方案还是 SSR，但我还是选择了 CSR 方案（毕竟是个人项目，怎么舒服怎么来），后续时间充裕的情况下再考虑下 SEO 优化。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">Web 端这块，我是直接选择了 </span></span><span style=\"color: rgb(2, 105, 200);\"><span style=\"font-size: 16px\"><a href=\"https://link.juejin.cn/?target=https%3A%2F%2Fv3.cn.vuejs.org%2F\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">Vue3</a></span></span><span style=\"font-size: 16px\"> + </span><span style=\"color: rgb(2, 105, 200);\"><span style=\"font-size: 16px\"><a href=\"https://link.juejin.cn/?target=https%3A%2F%2Fwww.typescriptlang.org%2Fdocs%2F\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">TS</a></span></span><span style=\"font-size: 16px\"> 作为一个开发骨架。作为一个代码洁癖选手，我还是非常倾向于使用 TS 的。</span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">UI 方面，我选择了 AntDesign 为主、ElementPlus 为辅的这样一个组合，这两个 UI 框架都是非常优秀的，但二者都有一些对方没实现的能力，所以我综合使用了二者。读者们也不用担心性能问题，按需加载情况下，用两套 UI 框架也没有什么压力，这一点我也是思考过的。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">视觉效果这块，基本上属于我自己发挥想象了，凭着自己感觉做的一个整体效果。然后我也是采用了 Mobile First 的理念，优先完成移动端视觉效果，结合 Media Query 去做一些其他屏幕的适配。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">在客户端这块，除了 Web 端，我早期还是做了小程序的，这个可以在微信直接搜索到，名字也是</span></span></span><strong><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">Tusi博客</span></span></span></strong><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/15ea276e9fbd413889133f2a2ab06f62~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">回过头来看，如果是这种跨端的系统，我应该优选 uniapp 这类的方案，不过这个小程序我做得比较早，那会儿我几乎还不会小程序开发，也是属于一个边学习边开发的状态。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">后端这块，也是开发得比较早，那会儿可选的 Node 框架也不多，所以我选择了比较流行的 </span></span><span style=\"color: rgb(2, 105, 200);\"><span style=\"font-size: 16px\"><a href=\"https://link.juejin.cn/?target=https%3A%2F%2Fwww.expressjs.com.cn%2F\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">Express</a></span></span><span style=\"font-size: 16px\">，这确实是一个易上手并且好用的框架，Express 不会给你灌输太多的设计模式，对于初次接触后端的朋友来说，是一个非常友好的选择。</span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">数据库我选择的是关系型数据库 MySQL，接入层当然首选 Nginx 啦。</span></span></span></p><h1 style=\"line-height: 150%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 24px\">云服务器配置</span></span></span></h1><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">我买的云服务器配置是：1核 2GB 1Mbps</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">这对于前期负载不是很高的个人项目来说，是足够的。反正现在都支持弹性伸缩，不够就加，问题不大。</span></span></span></p><h1 style=\"line-height: 150%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 24px\">部署方式</span></span></span></h1><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b3c668ccf8ea4c11bc4f37039e01dc33~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">整体上采用了自动化部署的策略。Node 这块是基于PM2去做进程守护和自动化部署。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/49136892bb784dc1ac9b6c2593505376~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">前端则是基于 Github Actions 实现的CI/CD。</span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\"><img src=\"https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1508dfb54f224212a43ffe799fd8c06d~tplv-k3u1fbpfcp-watermark.awebp\" alt=\"\" title=\"\" width=\"NaN\" height=\"NaN\" data-display=\"inline\"></span></span></span></p><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">我购买的云服务器配置很普通，图片资源放自己服务器上是不现实的，所以我的图片资源是放在七牛云存储。</span></span></span></p><h1 style=\"line-height: 150%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 24px\">未完待续</span></span></span></h1><p style=\"line-height: NaN%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 16px\">本文主要是对</span></span><span style=\"color: rgb(2, 105, 200);\"><span style=\"font-size: 16px\"><a href=\"https://link.juejin.cn/?target=https%3A%2F%2Fblog.wbjiang.cn%2F\" target=\"_blank\" ref=\"nofollow noopener noreferrer\">Tusi博客</a></span></span><span style=\"font-size: 16px\">做了一个总体的介绍，让大家先有个整体的印象。整个博客应用确实是比较简单，但也算是一个前后端完整的系统，应该能给朋友们带来一点帮助或思路。接下来，我将分几篇文章详细讲讲我是怎么实现这些功能的，敬请期待！</span></span></p><h1 style=\"line-height: 150%;\"><span style=\"font-family: -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial\"><span style=\"color: rgb(51, 51, 51);\"><span style=\"font-size: 24px\">代码，拿来吧你</span></span></span></h1><blockquote><p></p></blockquote><p></p>', 6, 1, 'http://127.0.0.1:8001/public/upload/20220306/1646538670248.jpg', 1, 26, 9999, 120, 1, '2022-03-06 11:51:15', '2022-04-21 14:19:39', NULL);
INSERT INTO `article` VALUES (48, 0, 'webpack2 + vue2 老项目迁移 vite 成功! 是真香啊...', '<p><img src=\"https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/57ca0f0f4b3a4ec087c4376f15c19722~tplv-k3u1fbpfcp-zoom-crop-mark:1304:1304:1304:734.awebp?\" alt=\"webpack2 + vue2 老项目迁移 vite 成功! 是真香啊...\" title=\"\" data-display=\"inline\"></p><p><strong>一定是Vite吗?</strong></p><ul><li><p>当然不是的, 最近随着 WebAssembly 这个概念的兴起, 其实Webpack5在性能上也有一些质的飞跃, <span style=\"color: #f44336;\">推荐你也去了解一下这个概念</span>.😝</p></li></ul><h1>迁移过程</h1><blockquote><p>如果你的项目足够庞大, 我相信你会在这一路踩坑中抓耳挠腮. 不过当看到项目正常启动的时候, 还是成就感满满的.</p></blockquote><p>直接对着项目:</p><pre><code>$ yarn add vite -D\n复制代码</code></pre><p>然后配置vite.config.js文件</p><pre><code>import { defineConfig } from \'vite\'\nimport { createVuePlugin } from \'vite-plugin-vue2\'\n\nexport default defineConfig({\n        plugins: [\n            createVuePlugin({\n                jsx: true, // jsx语法兼容处理, 实际上并没有用...后面我会说的\n            })\n        ]\n})</code></pre><p>package.json文件</p>', 5, 1, 'http://127.0.0.1:8001/public/upload/20220306/1646539730775.jpg', 1, 24, 0, 627, 1, '2022-03-06 12:08:05', '2022-04-24 15:50:25', NULL);
INSERT INTO `article` VALUES (51, 0, '发布测试', '发布测试', 5, 1, 'https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/be621121d0974f149fb03cd3652e4b54~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?', 0, 4, 4, 240, 1, '2022-03-06 15:15:12', '2022-04-24 15:40:38', NULL);
INSERT INTO `article` VALUES (52, 0, '测试', '<p>测试</p>', 4, 1, '', 0, -5, 0, 336, 1, '2022-03-11 13:35:04', '2022-04-22 14:17:38', NULL);
INSERT INTO `article` VALUES (53, 0, 'vue中使用element table，表格参数格式化formatter', '<p><img src=\"//upload-images.jianshu.io/upload_images/6523705-227e0697740ef15b.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp\" alt=\"\" title=\"\" data-display=\"inline\"></p><p>element table formatter</p><p>解决办法：仔细看官网</p><p><br> <img src=\"//upload-images.jianshu.io/upload_images/6523705-05dfa148e8cc3e91.png?imageMogr2/auto-orient/strip|imageView2/2/w/1192/format/webp\" alt=\"\" title=\"\" data-display=\"inline\"> element table formatter</p><h2>template</h2><pre><code>&lt;el-table\n      :data=\"tableData\"\n      ref=\"singleTable\"\n      highlight-current-row\n      style=\"width: 100%\"&gt;\n      &lt;el-table-column\n        type=\"index\"\n        :index = \"indexMethod\"\n        width=\"50\"&gt;\n      &lt;/el-table-column&gt;\n      &lt;el-table-column\n        prop=\"date\"\n        label=\"日期\"\n        width=\"180\"\n        &gt;\n      &lt;/el-table-column&gt;\n      &lt;el-table-column\n        prop=\"sex\"\n        label=\"性别\"\n        width=\"180\"\n        :formatter=\"formatSex\"\n        &gt;\n      &lt;/el-table-column&gt;\n      &lt;el-table-column\n        prop=\"name\"\n        label=\"姓名\"\n        width=\"180\"&gt;\n      &lt;/el-table-column&gt;\n      &lt;el-table-column\n        prop=\"address\"\n        label=\"地址\"\n        width=\"180\"&gt;\n      &lt;/el-table-column&gt;\n      &lt;!-- 渲染html的列 --&gt;\n      &lt;el-table-column label=\"地址\"&gt;\n          &lt;template slot-scope=\"scope\"&gt;\n              &lt;div v-html=\"scope.row.address\"&gt;&lt;/div&gt;\n          &lt;/template&gt;\n      &lt;/el-table-column&gt;\n      &lt;el-table-column label=\"操作\"&gt;\n        &lt;template slot-scope=\"scope\"&gt;\n          &lt;el-button\n            size=\"mini\"\n            @click=\"handleEdit(indexMethod(scope.$index), scope.row)\"&gt;编辑&lt;/el-button&gt;\n          &lt;el-button\n            size=\"mini\"\n            type=\"danger\"\n            @click=\"handleDelete(indexMethod(scope.$index), scope.row)\"&gt;删除&lt;/el-button&gt;\n        &lt;/template&gt;\n      &lt;/el-table-column&gt;\n    &lt;/el-table&gt;\n</code></pre><h2>data</h2><pre><code>tableData: [{\n        myIndex: 6,\n        date: \'2016-05-02\',\n        name: \'王小虎\',\n        address: \'&lt;i&gt;上海市普陀区金沙江路 1518 弄&lt;/i&gt;\',\n        sex: 0\n      }, {\n        myIndex: 7,\n        date: \'2016-05-04\',\n        name: \'王小虎\',\n        address: \'上海市普陀区金沙江路 1517 弄\',\n        sex: 1\n      }, {\n        myIndex: 8,\n        date: \'2016-05-01\',\n        name: \'王小虎\',\n        address: \'上海市普陀区金沙江路 1519 弄\',\n        sex: -1\n      }, {\n        myIndex: 9,\n        date: \'2016-05-03\',\n        name: \'王小虎\',\n        address: \'上海市普陀区金沙江路 1516 弄\',\n        sex: 0\n      }]\n</code></pre><h2>methods</h2><pre><code>formatSex: function (row, column) {\n      return row.sex === 1 ? \'男\' : row.sex === 0 ? \'女\' : \'未知\'\n}</code></pre><p><br></p>', 5, 2, '', 0, 0, 1, 140, 1, '2022-03-30 13:34:19', '2022-04-25 09:04:02', NULL);
COMMIT;

-- ----------------------------
-- Table structure for article_category
-- ----------------------------
DROP TABLE IF EXISTS `article_category`;
CREATE TABLE `article_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `keywords` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article_category
-- ----------------------------
BEGIN;
INSERT INTO `article_category` VALUES (1, '前端', '前端', '前端描述', 1, '2022-02-12 14:28:27', '2022-02-12 14:28:29', '2022-02-12 14:34:23');
INSERT INTO `article_category` VALUES (2, '111', '11', '11', 1, '2022-02-12 14:50:39', '2022-02-12 14:50:42', '2022-02-25 10:06:11');
INSERT INTO `article_category` VALUES (3, '军事', '军事', '军事', 1, '2022-02-25 09:20:45', '2022-02-25 09:20:45', NULL);
INSERT INTO `article_category` VALUES (4, '科技', '科技', '科技', 1, '2022-02-25 09:21:02', '2022-02-25 09:21:02', NULL);
INSERT INTO `article_category` VALUES (5, '娱乐', '娱乐', '娱乐', 1, '2022-02-25 09:21:16', '2022-02-25 09:21:16', NULL);
INSERT INTO `article_category` VALUES (6, '体育', '体育', '体育', 1, '2022-02-25 09:21:33', '2022-02-25 09:21:33', NULL);
COMMIT;

-- ----------------------------
-- Table structure for article_dislikes
-- ----------------------------
DROP TABLE IF EXISTS `article_dislikes`;
CREATE TABLE `article_dislikes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `article_id` int NOT NULL COMMENT '不喜欢的文章id',
  `user_id` int NOT NULL COMMENT '用户id',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:不正常;1:正常;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article_dislikes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for article_view
-- ----------------------------
DROP TABLE IF EXISTS `article_view`;
CREATE TABLE `article_view` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `number` int NOT NULL DEFAULT '1',
  `article_id` int NOT NULL COMMENT '浏览的文章id',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article_view
-- ----------------------------
BEGIN;
INSERT INTO `article_view` VALUES (9, 1, 215, 48, '2022-03-17 17:50:30', '2022-04-24 15:50:25', NULL);
INSERT INTO `article_view` VALUES (10, 1, 32, 47, '2022-03-17 17:54:53', '2022-04-21 14:19:39', NULL);
INSERT INTO `article_view` VALUES (11, 1, 92, 52, '2022-03-17 20:26:32', '2022-04-22 14:17:38', NULL);
INSERT INTO `article_view` VALUES (15, 1, 30, 45, '2022-03-28 12:08:58', '2022-04-22 08:59:13', NULL);
INSERT INTO `article_view` VALUES (16, 1, 24, 46, '2022-03-28 13:03:36', '2022-04-21 14:53:12', NULL);
INSERT INTO `article_view` VALUES (17, 2, 2, 51, '2022-03-29 11:39:59', '2022-03-29 16:02:46', NULL);
INSERT INTO `article_view` VALUES (18, 2, 1, 48, '2022-03-29 11:40:10', '2022-03-29 11:40:10', NULL);
INSERT INTO `article_view` VALUES (19, 1, 9, 44, '2022-03-30 12:58:42', '2022-04-19 15:43:59', NULL);
INSERT INTO `article_view` VALUES (20, 2, 1, 53, '2022-03-30 13:35:35', '2022-03-30 13:35:35', NULL);
INSERT INTO `article_view` VALUES (21, 1, 129, 53, '2022-04-01 12:20:25', '2022-04-25 09:04:02', NULL);
INSERT INTO `article_view` VALUES (22, 1, 24, 5, '2022-04-17 14:19:18', '2022-04-19 15:18:06', NULL);
INSERT INTO `article_view` VALUES (23, 7, 10, 53, '2022-04-21 10:05:53', '2022-04-21 10:10:33', NULL);
INSERT INTO `article_view` VALUES (24, 7, 11, 48, '2022-04-21 10:14:46', '2022-04-21 10:20:59', NULL);
INSERT INTO `article_view` VALUES (25, 7, 1, 6, '2022-04-21 10:21:26', '2022-04-21 10:21:26', NULL);
INSERT INTO `article_view` VALUES (26, 7, 1, 51, '2022-04-21 10:21:36', '2022-04-21 10:21:36', NULL);
INSERT INTO `article_view` VALUES (27, 1, 9, 51, '2022-04-21 14:19:18', '2022-04-24 15:40:38', NULL);
INSERT INTO `article_view` VALUES (28, 1, 2, 6, '2022-04-21 14:19:47', '2022-04-21 14:53:10', NULL);
COMMIT;

-- ----------------------------
-- Table structure for follower
-- ----------------------------
DROP TABLE IF EXISTS `follower`;
CREATE TABLE `follower` (
  `id` int NOT NULL AUTO_INCREMENT,
  `foller_id` int NOT NULL COMMENT '关注者(粉丝)id',
  `follerd_id` int NOT NULL COMMENT '被关注的用户id',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:不正常;1:正常;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `foller_id` (`foller_id`),
  KEY `follerd_id` (`follerd_id`),
  CONSTRAINT `follower_ibfk_1` FOREIGN KEY (`foller_id`) REFERENCES `user` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `follower_ibfk_2` FOREIGN KEY (`follerd_id`) REFERENCES `user` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of follower
-- ----------------------------
BEGIN;
INSERT INTO `follower` VALUES (2, 2, 1, 1, '2022-03-29 13:19:40', '2022-03-29 13:19:42', NULL);
INSERT INTO `follower` VALUES (9, 1, 2, 1, '2022-04-20 18:16:24', '2022-04-20 18:16:24', NULL);
COMMIT;

-- ----------------------------
-- Table structure for link
-- ----------------------------
DROP TABLE IF EXISTS `link`;
CREATE TABLE `link` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `pic` varchar(255) DEFAULT NULL,
  `sort` int DEFAULT NULL,
  `stutas` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of link
-- ----------------------------
BEGIN;
INSERT INTO `link` VALUES (2, '百度', 'www.baidu.com', 'https://www.baidu.com/img/flexible/logo/pc/result@2.png', 2, 1, '2022-02-13 17:55:49', '2022-02-15 08:27:53', NULL);
INSERT INTO `link` VALUES (3, '阿里云', 'https://www.aliyun.com/', 'https://img.alicdn.com/tfs/TB13DzOjXP7gK0jSZFjXXc5aXXa-212-48.png', 3, 1, '2022-02-13 17:57:55', '2022-02-13 17:57:55', NULL);
INSERT INTO `link` VALUES (4, '阿里云盘', 'https://www.aliyundrive.com/', 'https://gw.alicdn.com/imgextra/i2/O1CN012zI3pB1XLS21rJ9Je_!!6000000002907-55-tps-108-24.svg', 4, 1, '2022-02-13 18:00:33', '2022-02-14 15:37:37', NULL);
INSERT INTO `link` VALUES (5, '码云gitee', 'https://gitee.com/', 'https://gitee.com/static/images/logo-black.svg?t=158106664', 5, 1, '2022-02-13 18:05:44', '2022-02-14 09:48:30', NULL);
INSERT INTO `link` VALUES (37, '久爱网络k', 'http://www.i6i8.cn', 'https://qiye.aliyun.com/attachment/download_docstore?fileID=b84a2fd7-efb6-4e21-8596-c2917222ee16', 0, 1, '2022-02-14 16:08:40', '2022-02-20 18:59:24', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_address
-- ----------------------------
DROP TABLE IF EXISTS `mall_address`;
CREATE TABLE `mall_address` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL COMMENT '用户id',
  `consignee` varchar(255) NOT NULL COMMENT '收货人姓名',
  `phone` char(11) NOT NULL COMMENT '收货人手机号码',
  `address` varchar(255) NOT NULL COMMENT '收货人的地址',
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为默认地址 0:不是(默认值) 1:是',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_address
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_brand
-- ----------------------------
DROP TABLE IF EXISTS `mall_brand`;
CREATE TABLE `mall_brand` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL COMMENT '类目的ID，品牌属于哪个类目下',
  `name` varchar(255) NOT NULL COMMENT '品牌名称',
  `logo` varchar(255) DEFAULT NULL COMMENT '品牌logo标识',
  `desc` varchar(255) DEFAULT NULL COMMENT '品牌描述',
  `url` varchar(255) DEFAULT NULL COMMENT '品牌链接',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '品牌状态是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  CONSTRAINT `mall_brand_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `mall_category` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_brand
-- ----------------------------
BEGIN;
INSERT INTO `mall_brand` VALUES (1, 21, '小米', 'http://127.0.0.1:8001/public/upload/20220415/1650017932100.png', '小米官网直营小米公司旗下所有产品,包括Xiaomi手机系列Xiaomi 11 Ultra、MIX FOLD,Redmi 红米系列Redmi Note 9、Redmi K40 Pro,小米电视、笔记本、米家智能家居等,同时提供小...', NULL, 1, '2022-04-15 18:59:54', '2022-04-15 19:32:54', NULL);
INSERT INTO `mall_brand` VALUES (2, 21, '苹果', 'http://127.0.0.1:8001/public/upload/20220416/1650070322418.jpg', '苹果手机', NULL, 1, '2022-04-16 08:52:07', '2022-04-16 08:52:07', NULL);
INSERT INTO `mall_brand` VALUES (3, 28, '美的', 'http://127.0.0.1:8001/public/upload/20220416/1650070404534.png', '美的空调', NULL, 1, '2022-04-16 08:53:39', '2022-04-16 08:53:39', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_cart
-- ----------------------------
DROP TABLE IF EXISTS `mall_cart`;
CREATE TABLE `mall_cart` (
  `id` int NOT NULL AUTO_INCREMENT,
  `goods_id` int NOT NULL COMMENT '商品的ID',
  `user_id` int NOT NULL COMMENT '用户的ID',
  `number` int NOT NULL DEFAULT '1' COMMENT '商品的数量 默认为1',
  `selected` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `goods_id` (`goods_id`),
  CONSTRAINT `mall_cart_ibfk_1` FOREIGN KEY (`goods_id`) REFERENCES `mall_goods` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_cart
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_category
-- ----------------------------
DROP TABLE IF EXISTS `mall_category`;
CREATE TABLE `mall_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT '类别名称',
  `parentId` int NOT NULL DEFAULT '0' COMMENT '父id',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_category
-- ----------------------------
BEGIN;
INSERT INTO `mall_category` VALUES (18, '家用电器', 0, 1, '2022-04-15 15:35:06', '2022-04-15 16:41:24', NULL);
INSERT INTO `mall_category` VALUES (19, '手机/运营商/数码', 0, 1, '2022-04-15 15:37:16', '2022-04-15 15:37:16', NULL);
INSERT INTO `mall_category` VALUES (21, '手机', 19, 1, '2022-04-15 15:39:41', '2022-04-15 15:39:41', NULL);
INSERT INTO `mall_category` VALUES (22, '运营商', 19, 1, '2022-04-15 15:39:59', '2022-04-15 15:39:59', NULL);
INSERT INTO `mall_category` VALUES (24, '数码配件', 19, 1, '2022-04-15 15:40:36', '2022-04-15 15:40:36', NULL);
INSERT INTO `mall_category` VALUES (25, '游戏手机', 21, 1, '2022-04-15 15:41:12', '2022-04-15 15:41:12', NULL);
INSERT INTO `mall_category` VALUES (26, '拍照手机', 21, 1, '2022-04-15 15:41:26', '2022-04-15 15:41:26', NULL);
INSERT INTO `mall_category` VALUES (28, '空调', 18, 1, '2022-04-15 15:42:31', '2022-04-15 16:40:21', NULL);
INSERT INTO `mall_category` VALUES (29, '洗衣机', 18, 1, '2022-04-15 15:43:40', '2022-04-15 15:43:40', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_goods
-- ----------------------------
DROP TABLE IF EXISTS `mall_goods`;
CREATE TABLE `mall_goods` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT '商品名称',
  `shop_id` bigint NOT NULL COMMENT '商铺id',
  `category_id` bigint NOT NULL COMMENT '分类id',
  `price` decimal(10,2) NOT NULL COMMENT '商品价格',
  `num` bigint NOT NULL COMMENT '商品库存',
  `img` varchar(255) NOT NULL COMMENT '商品图片',
  `describe` varchar(255) NOT NULL COMMENT '商品内容',
  `comment_count` bigint NOT NULL DEFAULT '0' COMMENT '评论数',
  `collection_count` bigint NOT NULL DEFAULT '0' COMMENT '收藏数',
  `view_count` bigint NOT NULL DEFAULT '0' COMMENT '浏览数',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '发布状态 1 已发布｜ 0 草稿',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_goods
-- ----------------------------
BEGIN;
INSERT INTO `mall_goods` VALUES (1, 'Apple/苹果 iPhone 12 手机国行正品5G 双卡双待 全国联保', 15, 2, 5299.00, 15, 'https://g-search3.alicdn.com/img/bao/uploaded/i4/i1/2024314280/O1CN01BBzlgS1hUHsX6T6kd_!!0-item_pic.jpg_230x230.jpg_.webp', 'java文章', 0, 0, 0, 1, '2022-04-14 15:51:38', '2022-04-14 15:51:38', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_order
-- ----------------------------
DROP TABLE IF EXISTS `mall_order`;
CREATE TABLE `mall_order` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL COMMENT '用户id',
  `address_id` int NOT NULL COMMENT '地址id',
  `shop_id` int NOT NULL COMMENT '商铺id',
  `goods_id` text NOT NULL COMMENT '商品id',
  `total` decimal(10,2) NOT NULL COMMENT '订单总金额',
  `order_number` char(35) NOT NULL COMMENT '唯一订单号',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '订单状态(0:未支付，1已支付，2已发货，3已签收，4取消)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_number` (`order_number`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_order
-- ----------------------------
BEGIN;
INSERT INTO `mall_order` VALUES (1, 1, 8, 1, '1', 199.99, '202204141111649920938649', 3, '2022-04-14 15:22:18', '2022-04-14 15:31:11', '2022-04-14 15:35:57');
COMMIT;

-- ----------------------------
-- Table structure for mall_shop
-- ----------------------------
DROP TABLE IF EXISTS `mall_shop`;
CREATE TABLE `mall_shop` (
  `id` int NOT NULL AUTO_INCREMENT,
  `shop_name` varchar(255) DEFAULT NULL COMMENT '商铺名称',
  `user_id` int NOT NULL COMMENT '用户id',
  `introduce` varchar(255) DEFAULT NULL COMMENT '商铺介绍',
  `avatar` text COMMENT '头像',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_shop
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_shopApply
-- ----------------------------
DROP TABLE IF EXISTS `mall_shopApply`;
CREATE TABLE `mall_shopApply` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL COMMENT '用户id',
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `phone` bigint NOT NULL COMMENT '手机号码',
  `idCard` bigint NOT NULL COMMENT '身份证号码',
  `address` varchar(255) NOT NULL COMMENT '地址',
  `idCard_just` varchar(255) NOT NULL COMMENT '身份证正面',
  `idCard_opposite` varchar(255) NOT NULL COMMENT '身份证背面',
  `idCard_take` varchar(255) NOT NULL COMMENT '手持身份证',
  `desc` varchar(255) DEFAULT NULL COMMENT '审核描述',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:审核失败;1:审核中;2:审核通过)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_shopApply
-- ----------------------------
BEGIN;
INSERT INTO `mall_shopApply` VALUES (2, 1, '小李', 13888888888, 431024199606234537, '广东省，东莞市，东城区，详细地址。。。', '图片地址', '图片地址', '图片地址', '该身份证已经申请过', 0, '2022-04-12 13:26:24', '2022-04-14 15:43:47', NULL);
INSERT INTO `mall_shopApply` VALUES (3, 1, '小李', 13888888888, 431024199606234537, '广东省，东莞市，东城区，详细地址。。。', '图片地址', '图片地址', '图片地址', '可以', 2, '2022-04-14 10:05:43', '2022-04-14 15:55:06', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_sku
-- ----------------------------
DROP TABLE IF EXISTS `mall_sku`;
CREATE TABLE `mall_sku` (
  `id` int NOT NULL AUTO_INCREMENT,
  `spu_id` bigint NOT NULL COMMENT 'SPU Id',
  `title` varchar(256) NOT NULL COMMENT '商品标题',
  `images` varchar(256) DEFAULT '' COMMENT '商品图片 (多个图片用,号分割)',
  `stock` bigint DEFAULT '0' COMMENT '库存',
  `price` bigint NOT NULL DEFAULT '0' COMMENT '销售价格 (单位为分)',
  `indexes` varchar(32) DEFAULT '' COMMENT '特有规格参数在SPU规格模板中对应的下标组合(如1_0_0)',
  `own_spec` text COMMENT 'SKU的特有规格参数键值对 (json格式，反序列化时请使用linkedHashMap，保证有序)',
  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否有效 (0-无效，1-有效)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_sku
-- ----------------------------
BEGIN;
INSERT INTO `mall_sku` VALUES (1, 1, '小米手机sku', '图片1，图片2', 99, 10, '', '{\"4\":\"白色\",\"12\":\"3GB\",\"13\":\"16GB\"}', 1, '2022-04-16 14:27:48', '2022-04-16 14:27:48', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_spec_group
-- ----------------------------
DROP TABLE IF EXISTS `mall_spec_group`;
CREATE TABLE `mall_spec_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` bigint NOT NULL COMMENT '类目的ID，规格组属于哪个类目下',
  `name` varchar(255) NOT NULL COMMENT '规格组名称',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_spec_group
-- ----------------------------
BEGIN;
INSERT INTO `mall_spec_group` VALUES (1, 21, '主体', '2022-04-16 13:19:54', '2022-04-16 13:19:54', NULL);
INSERT INTO `mall_spec_group` VALUES (2, 21, '基本信息', '2022-04-16 13:21:44', '2022-04-16 13:21:47', NULL);
INSERT INTO `mall_spec_group` VALUES (3, 21, '前置摄像头', '2022-04-16 13:22:09', '2022-04-16 13:22:09', NULL);
INSERT INTO `mall_spec_group` VALUES (4, 21, '后置摄像头', '2022-04-16 13:22:15', '2022-04-16 13:22:15', NULL);
INSERT INTO `mall_spec_group` VALUES (5, 21, '屏幕', '2022-04-16 13:22:25', '2022-04-16 13:22:25', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_spec_param
-- ----------------------------
DROP TABLE IF EXISTS `mall_spec_param`;
CREATE TABLE `mall_spec_param` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` bigint DEFAULT NULL COMMENT '类目的ID，规格组属于哪个类目下',
  `group_id` bigint NOT NULL COMMENT '规则组Id (参数所属的规格组)',
  `name` varchar(255) NOT NULL COMMENT '参数名',
  `numeric` tinyint(1) NOT NULL COMMENT '是否是数字类型参数 (true或false)',
  `unit` varchar(128) DEFAULT NULL COMMENT '数字类型参数的单位 (非数字类型可以为空)',
  `generic` tinyint(1) NOT NULL COMMENT '是否是SKU通用规格 (true或false)',
  `searching` tinyint(1) NOT NULL COMMENT '是否用于搜索过滤 (true或false)',
  `segments` varchar(1024) DEFAULT '' COMMENT '区间 (数值类型参数的预设区间值，如果需要搜索，则添加分段间隔值，如CPU频率间隔：0.5-1.0)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_spec_param
-- ----------------------------
BEGIN;
INSERT INTO `mall_spec_param` VALUES (1, NULL, 5, '屏幕材质', 0, NULL, 0, 0, '', '2022-04-16 13:31:53', '2022-04-16 13:31:53', NULL);
INSERT INTO `mall_spec_param` VALUES (2, NULL, 5, '屏幕刷新率', 0, NULL, 0, 0, '', '2022-04-16 13:32:02', '2022-04-16 13:32:02', NULL);
INSERT INTO `mall_spec_param` VALUES (3, NULL, 5, '屏幕尺寸', 0, NULL, 0, 0, '', '2022-04-16 13:32:03', '2022-04-16 13:32:03', NULL);
INSERT INTO `mall_spec_param` VALUES (4, NULL, 1, '入网型号', 0, NULL, 0, 0, '', '2022-04-16 13:34:29', '2022-04-16 13:34:29', NULL);
INSERT INTO `mall_spec_param` VALUES (5, NULL, 1, '上市年份', 0, '', 0, 0, '', '2022-04-16 13:35:36', '2022-04-16 13:35:36', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_spu
-- ----------------------------
DROP TABLE IF EXISTS `mall_spu`;
CREATE TABLE `mall_spu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id1` bigint NOT NULL COMMENT '1级分类Id',
  `category_id2` bigint NOT NULL COMMENT '2级分类Id',
  `category_id3` bigint NOT NULL COMMENT '3级分类Id',
  `brand_id` bigint NOT NULL COMMENT '品牌Id (商品所属的品牌)',
  `title` varchar(256) NOT NULL COMMENT '商品标题',
  `sub_title` varchar(256) DEFAULT '' COMMENT '副标题 (一般是促销信息)',
  `saleable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否上架 (0-下架，1-上架',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_spu
-- ----------------------------
BEGIN;
INSERT INTO `mall_spu` VALUES (1, 0, 19, 0, 1, '小米手机spu', '副标题 (一般是促销信息)', 1, '2022-04-16 13:51:14', '2022-04-16 13:51:14', NULL);
COMMIT;

-- ----------------------------
-- Table structure for mall_spu_detail
-- ----------------------------
DROP TABLE IF EXISTS `mall_spu_detail`;
CREATE TABLE `mall_spu_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `spu_id` bigint NOT NULL COMMENT 'SPU Id',
  `description` text COMMENT '商品描述信息',
  `generic_spec` varchar(2048) NOT NULL DEFAULT '' COMMENT '通用规格键值对 (json格式)',
  `special_spec` varchar(1024) NOT NULL DEFAULT '' COMMENT '特有规格可选值 (json格式)',
  `packing_list` varchar(1024) DEFAULT '' COMMENT '包装清单',
  `after_service` varchar(1024) DEFAULT '' COMMENT '售后服务',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of mall_spu_detail
-- ----------------------------
BEGIN;
INSERT INTO `mall_spu_detail` VALUES (1, 1, '商品描述信息', '', '', '', '', '2022-04-16 13:56:59', '2022-04-16 13:56:59', NULL);
INSERT INTO `mall_spu_detail` VALUES (2, 1, '商品描述信息', '{	\"1\": \"华为\",	\"2\": \"G9青春版（全网通版）\",	\"3\": 2016,	\"5\": 143,	\"6\": \"陶瓷\",	\"7\": \"Android\",	\"8\": \"骁龙（Snapdragon)\",	\"9\": \"骁龙617（msm8952）\",	\"10\": \"八核\",	\"11\": 1.5,	\"14\": 5.2,	\"15\": \"1920*1080(FHD)\",	\"16\": 800,	\"17\": 1300,	\"18\": 3000}', '', '', '', '2022-04-16 13:58:17', '2022-04-16 13:58:17', NULL);
INSERT INTO `mall_spu_detail` VALUES (3, 1, '商品描述信息', '{	\"1\": \"华为\",	\"2\": \"G9青春版（全网通版）\",	\"3\": 2016,	\"5\": 143,	\"6\": \"陶瓷\",	\"7\": \"Android\",	\"8\": \"骁龙（Snapdragon)\",	\"9\": \"骁龙617（msm8952）\",	\"10\": \"八核\",	\"11\": 1.5,	\"14\": 5.2,	\"15\": \"1920*1080(FHD)\",	\"16\": 800,	\"17\": 1300,	\"18\": 3000}', '{	\"4\": [\"白色\", \"金色\", \"玫瑰金\"],	\"12\": [\"3GB\"],	\"13\": [\"16GB\"]}', '', '', '2022-04-16 13:58:45', '2022-04-16 13:58:45', NULL);
COMMIT;

-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `menu_name` varchar(255) NOT NULL,
  `menu_url` varchar(255) NOT NULL,
  `menu_icon` varchar(255) NOT NULL,
  `menu_type` int NOT NULL,
  `menu_sort` int NOT NULL,
  `parentId` int NOT NULL,
  `permission` varchar(255) NOT NULL,
  `createdUser` varchar(255) NOT NULL,
  `modifiedUser` varchar(255) NOT NULL,
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态 0 正常，1 禁用',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of menu
-- ----------------------------
BEGIN;
INSERT INTO `menu` VALUES (1, '系统管理', '/user', 'el-icon-s-tools', 1, 1, 0, 'sys:user:create', '小红', '小王', 1, '2022-02-11 16:59:41', '2022-02-26 10:58:05', NULL);
INSERT INTO `menu` VALUES (2, '商品管理', '/user', 'el-icon-s-goods', 1, 1, 0, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:00:06', '2022-02-17 12:30:33', NULL);
INSERT INTO `menu` VALUES (3, '文章管理', '/user', 'el-icon-s-order', 1, 1, 0, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:00:16', '2022-02-17 12:23:20', NULL);
INSERT INTO `menu` VALUES (4, '评论管理', '/user', 'el-icon-chat-dot-square', 1, 1, 0, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:00:24', '2022-02-17 12:23:19', NULL);
INSERT INTO `menu` VALUES (5, '用户管理', '/user', 'el-icon-user-solid', 1, 1, 1, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:00:49', '2022-02-17 12:30:43', NULL);
INSERT INTO `menu` VALUES (6, '角色管理', '/user', 'el-icon-s-custom', 1, 1, 1, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:00:55', '2022-02-15 11:07:10', NULL);
INSERT INTO `menu` VALUES (7, '权限管理', '/user', 'el-icon-s-check', 1, 1, 1, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:01:06', '2022-02-17 12:29:06', NULL);
INSERT INTO `menu` VALUES (8, '商品列表', '/user', 'el-icon-tickets', 1, 1, 2, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:01:40', '2022-02-17 12:23:21', NULL);
INSERT INTO `menu` VALUES (9, '商品参数', '/user', 'el-icon-paperclip\n', 1, 1, 2, 'sys:user:create', '小红', '小王', 1, '2022-02-11 17:01:47', '2022-02-17 12:26:17', NULL);
INSERT INTO `menu` VALUES (10, '动态参数', '/user', 'el-icon-s-goods', 1, 1, 9, 'sys:user:create', '小红', '小王', 1, '2022-02-12 15:39:50', '2022-02-17 12:23:18', NULL);
INSERT INTO `menu` VALUES (27, '参数', '/user', 'el-icon-tickets', 1, 1, 0, 'sys:user:create', '小红', '小王', 0, '2022-02-15 09:42:48', '2022-02-15 09:42:48', NULL);
INSERT INTO `menu` VALUES (29, 'test11', '111', '222', 2, 2, 2, '1', '1', '1', 1, '2022-02-15 12:00:04', '2022-02-16 15:34:20', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_article_collect
-- ----------------------------
DROP TABLE IF EXISTS `news_article_collect`;
CREATE TABLE `news_article_collect` (
  `id` int NOT NULL AUTO_INCREMENT,
  `article_id` int NOT NULL COMMENT '文章id',
  `user_id` int NOT NULL COMMENT '用户id',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:不正常;1:正常;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_article_collect
-- ----------------------------
BEGIN;
INSERT INTO `news_article_collect` VALUES (2, 48, 2, 1, '2022-03-14 11:41:02', '2022-03-14 11:41:04', NULL);
INSERT INTO `news_article_collect` VALUES (16, 51, 1, 1, '2022-04-19 14:38:54', '2022-04-19 14:38:54', NULL);
INSERT INTO `news_article_collect` VALUES (20, 53, 1, 1, '2022-04-20 18:17:06', '2022-04-20 18:17:06', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_article_liking
-- ----------------------------
DROP TABLE IF EXISTS `news_article_liking`;
CREATE TABLE `news_article_liking` (
  `id` int NOT NULL AUTO_INCREMENT,
  `article_id` int NOT NULL COMMENT '文章id',
  `user_id` int NOT NULL COMMENT '用户id',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:不正常;1:正常;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_article_liking
-- ----------------------------
BEGIN;
INSERT INTO `news_article_liking` VALUES (49, 51, 2, 1, '2022-03-16 13:04:15', '2022-03-16 13:04:18', NULL);
INSERT INTO `news_article_liking` VALUES (55, 46, 1, 1, '2022-03-28 13:03:37', '2022-03-28 13:03:37', NULL);
INSERT INTO `news_article_liking` VALUES (80, 53, 1, 1, '2022-04-20 17:57:28', '2022-04-20 17:57:28', NULL);
INSERT INTO `news_article_liking` VALUES (84, 51, 1, 1, '2022-04-22 10:25:42', '2022-04-22 10:25:42', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_comment
-- ----------------------------
DROP TABLE IF EXISTS `news_comment`;
CREATE TABLE `news_comment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `article_id` int NOT NULL COMMENT '文章id',
  `user_id` int NOT NULL COMMENT '评论者id',
  `reply_user_id` int DEFAULT NULL COMMENT '被回复的用户id',
  `parentId` int NOT NULL DEFAULT '0' COMMENT '父id，父id为0说明评论文章，否则为回复评论',
  `content` text NOT NULL COMMENT '评论内容',
  `is_top` tinyint NOT NULL DEFAULT '0' COMMENT '用于判断是否置顶，置顶为1，否则为0',
  `comment_count` bigint NOT NULL DEFAULT '0' COMMENT '评论数',
  `like_count` bigint NOT NULL DEFAULT '0' COMMENT '点赞数',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(;1:审核中;2:审核通过;3审核失败;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_comment
-- ----------------------------
BEGIN;
INSERT INTO `news_comment` VALUES (1, 6, 1, NULL, 0, '对文章评论，一级评论', 0, 0, 0, 1, '2022-02-26 13:10:34', '2022-02-26 13:10:34', '2022-02-28 09:31:43');
INSERT INTO `news_comment` VALUES (2, 6, 1, NULL, 1, '用户二 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:12:06', '2022-02-26 13:12:06', '2022-02-27 10:11:18');
INSERT INTO `news_comment` VALUES (3, 6, 3, 1, 1, '用户三 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:12:54', '2022-02-26 13:12:54', '2022-02-27 11:48:18');
INSERT INTO `news_comment` VALUES (4, 6, 2, NULL, 0, '用户三 对评论评论，二级评论', 0, 0, 0, 2, '2022-02-26 13:28:56', '2022-02-27 12:11:46', '2022-02-28 09:34:02');
INSERT INTO `news_comment` VALUES (5, 6, 2, NULL, 0, '用户三 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:28:59', '2022-02-26 13:28:59', '2022-02-26 13:35:58');
INSERT INTO `news_comment` VALUES (6, 6, 2, NULL, 0, '用户三 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:29:01', '2022-02-26 13:29:01', '2022-02-26 13:35:58');
INSERT INTO `news_comment` VALUES (7, 6, 2, NULL, 0, '用户三 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:29:02', '2022-02-26 13:29:02', '2022-02-26 13:34:33');
INSERT INTO `news_comment` VALUES (8, 5, 99, 3, 0, '我来说两句', 0, 0, 0, 1, '2022-02-26 13:37:02', '2022-02-26 13:44:19', '2022-02-27 10:11:18');
INSERT INTO `news_comment` VALUES (9, 6, 2, NULL, 4, '用户三 对评论评论，二级评论', 0, 0, 0, 1, '2022-02-26 13:37:46', '2022-02-26 13:37:46', '2022-02-27 10:09:51');
INSERT INTO `news_comment` VALUES (10, 6, 1, 2, 4, '回复admin2', 0, 0, 0, 1, '2022-02-27 09:40:40', '2022-02-27 12:11:40', '2022-02-28 09:34:18');
INSERT INTO `news_comment` VALUES (11, 6, 1, NULL, 0, 'admin评论文章', 0, 0, 0, 2, '2022-02-27 09:41:24', '2022-02-27 12:11:49', '2022-02-28 09:34:22');
INSERT INTO `news_comment` VALUES (12, 6, 1, NULL, 0, 'admin评论文章', 0, 0, 0, 1, '2022-02-28 09:24:41', '2022-02-28 09:24:41', '2022-02-28 09:34:24');
INSERT INTO `news_comment` VALUES (13, 6, 1, NULL, 0, 'admin评论文章', 0, 0, 0, 1, '2022-02-28 09:25:58', '2022-02-28 09:25:58', '2022-02-28 09:34:32');
INSERT INTO `news_comment` VALUES (14, 6, 1, NULL, 0, 'admin评论文章', 0, 0, 0, 1, '2022-02-28 09:26:15', '2022-02-28 09:26:15', '2022-02-28 09:34:32');
INSERT INTO `news_comment` VALUES (15, 6, 1, NULL, 0, 'admin评论文章', 0, 0, 0, 2, '2022-02-28 09:27:15', '2022-03-06 15:05:53', NULL);
INSERT INTO `news_comment` VALUES (27, 48, 2, NULL, 0, '评论文章48', 0, 0, 0, 1, '2022-03-08 10:23:07', '2022-03-13 14:03:43', NULL);
INSERT INTO `news_comment` VALUES (28, 48, 2, NULL, 0, '评论文章48', 0, 0, 0, 1, '2022-03-08 10:23:09', '2022-03-13 14:03:41', NULL);
INSERT INTO `news_comment` VALUES (29, 47, 2, NULL, 0, '评论文章48', 0, 0, 0, 1, '2022-03-08 10:23:14', '2022-03-08 10:23:14', NULL);
INSERT INTO `news_comment` VALUES (30, 47, 2, NULL, 0, '评论文章48', 0, 0, 0, 1, '2022-03-08 10:23:16', '2022-03-08 10:23:16', NULL);
INSERT INTO `news_comment` VALUES (31, 47, 2, NULL, 0, '评论文章48', 0, 0, 0, 1, '2022-03-08 10:23:18', '2022-03-08 10:23:18', NULL);
INSERT INTO `news_comment` VALUES (32, 46, 2, NULL, 0, '评论文章46', 0, 0, 0, 1, '2022-03-08 10:23:23', '2022-03-08 10:23:23', NULL);
INSERT INTO `news_comment` VALUES (33, 46, 2, NULL, 0, '评论文章46', 0, 0, 0, 1, '2022-03-08 10:23:29', '2022-03-08 10:23:29', NULL);
INSERT INTO `news_comment` VALUES (34, 46, 2, NULL, 0, '评论文章46', 0, 0, 0, 1, '2022-03-08 10:23:30', '2022-03-08 10:23:30', NULL);
INSERT INTO `news_comment` VALUES (35, 47, 1, NULL, 0, '我觉得不错', 0, 0, 0, 1, '2022-03-08 10:43:17', '2022-03-08 10:43:17', '2022-03-08 10:44:08');
INSERT INTO `news_comment` VALUES (36, 47, 2, 1, 0, '我也这样觉得', 0, 0, 0, 1, '2022-03-08 10:43:47', '2022-03-08 10:43:47', '2022-03-08 10:44:08');
INSERT INTO `news_comment` VALUES (37, 47, 1, NULL, 0, '我觉得说的不错啊', 0, 0, 6, 1, '2022-03-08 10:44:50', '2022-03-12 15:47:17', NULL);
INSERT INTO `news_comment` VALUES (38, 47, 2, 1, 37, '我也这样觉得', 0, 0, 0, 1, '2022-03-08 10:46:17', '2022-03-08 10:46:17', NULL);
INSERT INTO `news_comment` VALUES (39, 47, 7, 1, 37, '我也这样觉得7', 0, 0, 0, 1, '2022-03-08 10:49:09', '2022-03-08 10:49:09', NULL);
INSERT INTO `news_comment` VALUES (40, 47, 50, 1, 37, '我也这样觉得50', 0, 0, 0, 1, '2022-03-08 10:49:21', '2022-03-08 10:49:21', NULL);
INSERT INTO `news_comment` VALUES (41, 47, 50, 2, 37, '用户50回复用户2', 0, 0, 0, 1, '2022-03-08 10:50:07', '2022-03-08 10:50:07', NULL);
INSERT INTO `news_comment` VALUES (42, 48, 1, NULL, 0, 'pl', 0, 0, 0, 1, '2022-03-08 13:22:33', '2022-03-13 14:03:40', NULL);
INSERT INTO `news_comment` VALUES (43, 48, 1, NULL, 0, '111', 0, 0, 2, 1, '2022-03-08 13:32:28', '2022-03-13 14:03:25', NULL);
INSERT INTO `news_comment` VALUES (44, 48, 1, 2, 28, '可以的', 0, 0, 0, 1, '2022-03-08 14:19:58', '2022-03-08 14:19:58', NULL);
INSERT INTO `news_comment` VALUES (45, 48, 1, 1, 44, '可以的', 0, 0, 0, 1, '2022-03-08 14:21:06', '2022-03-08 14:21:06', NULL);
INSERT INTO `news_comment` VALUES (46, 48, 1, 1, 45, '11', 0, 0, 0, 1, '2022-03-08 14:23:25', '2022-03-08 14:23:25', NULL);
INSERT INTO `news_comment` VALUES (47, 48, 1, 1, 46, '2222', 0, 0, 0, 1, '2022-03-08 14:23:35', '2022-03-08 14:23:35', NULL);
INSERT INTO `news_comment` VALUES (48, 48, 1, 1, 44, '1111', 0, 0, 0, 1, '2022-03-08 14:23:40', '2022-03-08 14:23:40', NULL);
INSERT INTO `news_comment` VALUES (49, 48, 1, NULL, 0, '11', 0, 0, 0, 1, '2022-03-08 14:24:24', '2022-03-08 14:24:24', '2022-03-08 15:00:38');
INSERT INTO `news_comment` VALUES (50, 48, 1, NULL, 0, '11', 0, 0, 0, 1, '2022-03-08 14:38:51', '2022-03-08 14:38:51', '2022-03-08 15:00:38');
INSERT INTO `news_comment` VALUES (51, 48, 1, NULL, 0, '111', 0, 0, 0, 1, '2022-03-08 14:39:49', '2022-03-08 14:39:49', '2022-03-08 15:00:38');
INSERT INTO `news_comment` VALUES (52, 48, 1, NULL, 0, '111', 0, 0, 0, 1, '2022-03-08 14:40:15', '2022-03-08 14:40:15', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (53, 48, 1, NULL, 0, '111', 0, 0, 0, 1, '2022-03-08 14:41:48', '2022-03-08 14:41:48', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (54, 48, 1, NULL, 0, '111', 0, 0, 0, 1, '2022-03-08 14:44:49', '2022-03-08 14:44:49', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (55, 48, 1, NULL, 0, '111', 0, 0, 0, 1, '2022-03-08 14:45:55', '2022-03-08 14:45:55', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (56, 48, 1, NULL, 0, '1', 0, 0, 0, 1, '2022-03-08 14:48:47', '2022-03-08 14:48:47', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (57, 48, 1, NULL, 0, '1', 0, 0, 0, 1, '2022-03-08 14:52:01', '2022-03-08 14:52:01', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (58, 48, 1, NULL, 0, '1', 0, 0, 0, 1, '2022-03-08 14:59:03', '2022-03-08 14:59:03', '2022-03-08 15:00:20');
INSERT INTO `news_comment` VALUES (59, 48, 1, NULL, 0, '2', 0, 0, 0, 1, '2022-03-08 14:59:10', '2022-03-08 14:59:10', '2022-03-08 15:05:07');
INSERT INTO `news_comment` VALUES (60, 48, 1, NULL, 0, '3', 0, 0, 0, 1, '2022-03-08 14:59:13', '2022-03-08 14:59:13', '2022-03-08 15:05:07');
INSERT INTO `news_comment` VALUES (61, 48, 1, 1, 59, '你好', 0, 0, 0, 1, '2022-03-08 14:59:53', '2022-03-08 14:59:53', '2022-03-08 15:05:03');
INSERT INTO `news_comment` VALUES (62, 48, 1, 2, 28, '你说的真好', 0, 0, 0, 1, '2022-03-08 16:30:48', '2022-03-08 16:30:48', NULL);
INSERT INTO `news_comment` VALUES (63, 48, 1, 1, 43, '222', 0, 0, 2, 1, '2022-03-08 16:33:26', '2022-04-20 12:53:15', NULL);
INSERT INTO `news_comment` VALUES (64, 47, 1, 50, 41, '11', 0, 0, 0, 1, '2022-03-08 17:27:17', '2022-03-08 17:27:17', NULL);
INSERT INTO `news_comment` VALUES (65, 47, 1, 1, 37, '11', 0, 0, 0, 1, '2022-03-08 17:27:30', '2022-03-08 17:27:30', NULL);
INSERT INTO `news_comment` VALUES (66, 47, 1, 50, 41, '111', 0, 0, 0, 1, '2022-03-08 17:29:34', '2022-03-08 17:29:34', NULL);
INSERT INTO `news_comment` VALUES (67, 48, 1, 1, 28, '1', 0, 0, 0, 1, '2022-03-08 17:38:08', '2022-03-13 14:03:35', NULL);
INSERT INTO `news_comment` VALUES (68, 48, 1, 1, 44, '回复可以的', 0, 0, 0, 1, '2022-03-08 17:39:00', '2022-03-08 17:39:00', NULL);
INSERT INTO `news_comment` VALUES (69, 48, 1, 1, 44, '回复可以的 可以的', 0, 0, 0, 1, '2022-03-08 17:39:19', '2022-03-08 17:39:19', NULL);
INSERT INTO `news_comment` VALUES (70, 47, 1, 2, 31, '回复admin2', 0, 0, 0, 1, '2022-03-08 17:40:13', '2022-03-08 17:40:13', NULL);
INSERT INTO `news_comment` VALUES (71, 47, 2, 1, 31, '回复admin', 0, 0, 0, 1, '2022-03-08 17:42:00', '2022-03-08 17:42:00', NULL);
INSERT INTO `news_comment` VALUES (72, 47, 2, NULL, 0, '评论文章', 0, 0, 0, 1, '2022-03-08 17:44:21', '2022-03-08 17:44:21', NULL);
INSERT INTO `news_comment` VALUES (73, 47, 2, 2, 72, '回复自己', 0, 0, 0, 1, '2022-03-08 17:44:35', '2022-03-08 17:44:35', NULL);
INSERT INTO `news_comment` VALUES (74, 47, 2, 2, 72, '回复自己的自己', 0, 0, 0, 1, '2022-03-08 17:45:05', '2022-03-08 17:45:05', NULL);
INSERT INTO `news_comment` VALUES (75, 47, 2, 1, 37, '一般般', 0, 0, 0, 1, '2022-03-08 17:46:26', '2022-03-08 17:46:26', NULL);
INSERT INTO `news_comment` VALUES (76, 47, 2, 1, 37, '评论', 0, 0, 0, 1, '2022-03-08 18:39:18', '2022-03-12 15:47:32', NULL);
INSERT INTO `news_comment` VALUES (77, 47, 2, NULL, 0, '一级评论', 0, 0, 0, 1, '2022-03-08 18:42:22', '2022-03-08 18:42:22', NULL);
INSERT INTO `news_comment` VALUES (78, 47, 2, 2, 77, '二级回复一级评论', 0, 0, 0, 1, '2022-03-08 18:42:35', '2022-03-08 18:42:35', NULL);
INSERT INTO `news_comment` VALUES (79, 47, 2, 2, 77, '三级回复二级评论', 0, 0, 0, 1, '2022-03-08 18:42:49', '2022-03-08 18:42:49', NULL);
INSERT INTO `news_comment` VALUES (80, 51, 2, NULL, 0, '对文章进行评论', 0, 0, 1, 1, '2022-03-08 18:44:15', '2022-04-20 13:17:14', NULL);
INSERT INTO `news_comment` VALUES (81, 51, 1, 2, 80, '对评论进行评论，回复admin2', 0, 0, 0, 1, '2022-03-08 18:45:07', '2022-03-08 18:45:07', NULL);
INSERT INTO `news_comment` VALUES (82, 51, 50, 1, 80, '对评论进行三级评论，回复admin', 0, 0, 0, 1, '2022-03-08 18:46:28', '2022-03-08 18:46:28', NULL);
INSERT INTO `news_comment` VALUES (83, 51, 50, 2, 80, '对评论进行评论，回复admin2', 0, 0, 0, 1, '2022-03-08 18:47:00', '2022-03-08 18:47:00', NULL);
INSERT INTO `news_comment` VALUES (84, 51, 50, 2, 80, '回复自己吧', 0, 0, 0, 1, '2022-03-08 18:56:05', '2022-03-08 18:56:05', '2022-03-08 18:59:03');
INSERT INTO `news_comment` VALUES (85, 51, 50, 2, 80, '', 0, 0, 0, 1, '2022-03-08 19:01:14', '2022-03-12 15:45:54', '2022-04-19 15:21:40');
INSERT INTO `news_comment` VALUES (86, 6, 50, 1, 16, '经不经典我不管，我就喜欢这一款', 0, 0, 0, 1, '2022-03-08 19:17:20', '2022-04-24 15:50:43', NULL);
INSERT INTO `news_comment` VALUES (87, 51, 1, 2, 80, '牛的一批', 0, 0, 0, 1, '2022-03-08 19:20:45', '2022-04-19 15:24:41', NULL);
INSERT INTO `news_comment` VALUES (88, 51, 1, NULL, 0, '经不经典我不管，我就喜欢这一款', 0, 0, 1, 1, '2022-03-08 19:21:09', '2022-03-12 17:43:24', NULL);
INSERT INTO `news_comment` VALUES (89, 51, 1, NULL, 0, '经不经典我不管，我就喜欢这一款', 0, 0, 2, 1, '2022-03-08 19:21:19', '2022-03-12 17:42:21', '2022-04-19 15:21:36');
INSERT INTO `news_comment` VALUES (90, 44, 1, NULL, 0, '经不经典我不管，我就喜欢这一款,😂', 0, 0, 0, 1, '2022-03-08 19:34:15', '2022-03-08 19:34:15', '2022-04-19 15:21:49');
INSERT INTO `news_comment` VALUES (91, 51, 1, 1, 88, '英雄一笑为红颜，红颜一笑为了钱。', 0, 0, 1, 1, '2022-03-09 09:17:14', '2022-04-19 15:24:51', NULL);
INSERT INTO `news_comment` VALUES (106, 52, 1, NULL, 0, '评论1', 0, 0, 0, 1, '2022-03-12 13:51:25', '2022-03-12 17:40:55', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (107, 52, 1, NULL, 0, '评论2', 0, 0, 0, 1, '2022-03-12 13:51:29', '2022-03-13 13:12:02', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (108, 52, 1, NULL, 0, '评论3', 0, 0, 0, 1, '2022-03-12 13:51:33', '2022-03-13 12:59:52', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (109, 52, 1, NULL, 0, '评论4', 0, 0, 1, 1, '2022-03-12 13:51:52', '2022-03-12 17:42:10', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (110, 52, 1, NULL, 0, '评论5', 0, 0, 1, 3, '2022-03-12 13:51:57', '2022-03-16 12:14:08', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (111, 48, 1, NULL, 0, '', 0, 0, 0, 1, '2022-03-20 08:55:42', '2022-03-20 08:55:42', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (112, 52, 1, NULL, 0, '评论6', 0, 0, 0, 1, '2022-03-20 09:30:48', '2022-03-20 09:30:48', '2022-04-19 15:20:43');
INSERT INTO `news_comment` VALUES (113, 48, 1, 2, 28, '笑屎', 0, 0, 0, 1, '2022-03-20 10:23:40', '2022-03-20 10:23:40', NULL);
INSERT INTO `news_comment` VALUES (114, 48, 1, NULL, 0, '评论文章测试', 0, 0, 0, 1, '2022-03-20 10:40:53', '2022-03-20 10:40:53', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (115, 48, 1, NULL, 0, '评论2', 0, 0, 0, 1, '2022-03-20 10:41:00', '2022-03-20 10:41:00', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (116, 48, 1, NULL, 0, '评论3', 0, 0, 0, 1, '2022-03-20 10:41:04', '2022-03-20 10:41:04', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (117, 48, 1, NULL, 0, '评论9', 0, 0, 0, 1, '2022-03-20 10:41:16', '2022-03-20 10:41:16', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (118, 48, 1, NULL, 0, '评论10', 0, 0, 0, 1, '2022-03-20 10:41:21', '2022-03-20 10:41:21', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (119, 52, 1, NULL, 0, '', 0, 0, 0, 1, '2022-03-27 10:52:59', '2022-03-27 10:52:59', '2022-04-19 15:20:33');
INSERT INTO `news_comment` VALUES (120, 46, 1, NULL, 0, '笑不活了', 0, 0, 0, 1, '2022-03-29 15:41:55', '2022-03-29 15:41:55', NULL);
INSERT INTO `news_comment` VALUES (121, 45, 1, NULL, 0, '厉害了我的哥', 0, 0, 0, 1, '2022-03-29 15:48:07', '2022-03-29 15:48:07', '2022-04-19 15:21:36');
INSERT INTO `news_comment` VALUES (122, 51, 1, NULL, 0, '1111', 0, 0, 0, 1, '2022-04-19 15:00:58', '2022-04-19 15:00:58', '2022-04-19 15:19:35');
INSERT INTO `news_comment` VALUES (123, 51, 1, NULL, 0, '222', 0, 0, 0, 1, '2022-04-19 15:01:06', '2022-04-19 15:01:06', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (124, 44, 1, NULL, 0, 'hh', 0, 0, 0, 1, '2022-04-19 15:02:19', '2022-04-19 15:02:19', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (125, 5, 1, NULL, 0, 'en', 0, 0, 0, 1, '2022-04-19 15:04:08', '2022-04-19 15:04:08', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (126, 5, 1, NULL, 0, 'en1', 0, 0, 0, 1, '2022-04-19 15:04:16', '2022-04-19 15:04:16', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (127, 5, 1, NULL, 0, 'enen', 0, 0, 0, 1, '2022-04-19 15:04:22', '2022-04-19 15:04:22', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (128, 5, 1, NULL, 0, 'heihei', 0, 0, 0, 1, '2022-04-19 15:15:40', '2022-04-19 15:15:40', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (129, 5, 1, NULL, 0, 'xixi', 0, 0, 0, 1, '2022-04-19 15:15:53', '2022-04-19 15:15:53', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (130, 5, 1, NULL, 0, 'bb', 0, 0, 0, 1, '2022-04-19 15:16:00', '2022-04-19 15:16:00', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (131, 5, 1, NULL, 0, '浏览', 0, 0, 0, 1, '2022-04-19 15:17:58', '2022-04-19 15:17:58', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (132, 5, 1, NULL, 0, 'vv', 0, 0, 0, 1, '2022-04-19 15:18:06', '2022-04-19 15:18:06', '2022-04-19 15:19:27');
INSERT INTO `news_comment` VALUES (133, 6, 1, 3, 0, '说的好', 0, 0, 0, 1, '2022-04-20 12:07:02', '2022-04-20 18:16:34', NULL);
INSERT INTO `news_comment` VALUES (134, 6, 1, 3, 0, '说的好', 0, 0, 1, 1, '2022-04-20 12:12:16', '2022-04-20 13:17:38', NULL);
INSERT INTO `news_comment` VALUES (135, 52, 1, 50, 86, 'heihei', 0, 0, 0, 1, '2022-04-22 10:36:57', '2022-04-24 15:50:46', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_comment_liking
-- ----------------------------
DROP TABLE IF EXISTS `news_comment_liking`;
CREATE TABLE `news_comment_liking` (
  `id` int NOT NULL AUTO_INCREMENT,
  `comment_id` int NOT NULL COMMENT '评论id',
  `user_id` int NOT NULL COMMENT '用户id',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态(0:不正常;1:正常;)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_comment_liking
-- ----------------------------
BEGIN;
INSERT INTO `news_comment_liking` VALUES (34, 89, 1, 1, '2022-03-12 17:41:07', '2022-03-12 17:41:07', NULL);
INSERT INTO `news_comment_liking` VALUES (36, 110, 50, 1, '2022-03-12 17:41:51', '2022-03-12 17:41:51', NULL);
INSERT INTO `news_comment_liking` VALUES (37, 109, 50, 1, '2022-03-12 17:42:10', '2022-03-12 17:42:10', NULL);
INSERT INTO `news_comment_liking` VALUES (38, 89, 50, 1, '2022-03-12 17:42:21', '2022-03-12 17:42:21', NULL);
INSERT INTO `news_comment_liking` VALUES (39, 91, 50, 1, '2022-03-12 17:43:19', '2022-03-12 17:43:19', NULL);
INSERT INTO `news_comment_liking` VALUES (40, 88, 50, 1, '2022-03-12 17:43:24', '2022-03-12 17:43:24', NULL);
INSERT INTO `news_comment_liking` VALUES (41, 43, 50, 1, '2022-03-12 18:00:17', '2022-03-12 18:00:17', NULL);
INSERT INTO `news_comment_liking` VALUES (42, 63, 50, 1, '2022-03-12 18:00:23', '2022-03-12 18:00:23', NULL);
INSERT INTO `news_comment_liking` VALUES (45, 43, 2, 1, '2022-03-13 13:01:36', '2022-03-13 13:01:36', NULL);
INSERT INTO `news_comment_liking` VALUES (46, 63, 2, 1, '2022-03-13 13:01:38', '2022-03-13 13:01:38', NULL);
INSERT INTO `news_comment_liking` VALUES (48, 107, 2, 1, '2022-03-13 13:12:02', '2022-03-13 13:12:02', NULL);
INSERT INTO `news_comment_liking` VALUES (59, 80, 1, 1, '2022-04-20 13:17:14', '2022-04-20 13:17:14', NULL);
INSERT INTO `news_comment_liking` VALUES (60, 134, 1, 1, '2022-04-20 13:17:38', '2022-04-20 13:17:38', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_report
-- ----------------------------
DROP TABLE IF EXISTS `news_report`;
CREATE TABLE `news_report` (
  `id` int NOT NULL AUTO_INCREMENT,
  `article_id` int NOT NULL COMMENT '被举报的文章id',
  `user_id` int NOT NULL COMMENT '举报的用户id',
  `type` tinyint NOT NULL COMMENT '举报类型： 0-其他问题，1-标题夸张，2-低俗色情，3-错别字多，4-旧闻重复，5-广告软文，6-内容不实，7-涉嫌违法犯罪，8-侵权',
  `remark` text COMMENT '证明材料图片 举报描述文字',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '审核状态(0:审核失败;1:审核中;2:审核成功)',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_report
-- ----------------------------
BEGIN;
INSERT INTO `news_report` VALUES (12, 45, 1, 9, '诈骗啊', 1, '2022-03-30 12:59:21', '2022-03-31 12:08:00', NULL);
INSERT INTO `news_report` VALUES (13, 45, 2, 2, 'hhh', 3, '2022-03-31 11:38:40', '2022-04-01 08:30:36', NULL);
INSERT INTO `news_report` VALUES (14, 45, 50, 3, '2222', 2, '2022-03-31 11:39:04', '2022-04-01 08:30:40', NULL);
INSERT INTO `news_report` VALUES (15, 46, 50, 2, '1', 1, '2022-03-31 11:47:06', '2022-03-31 11:47:10', NULL);
INSERT INTO `news_report` VALUES (16, 48, 1, 1, '嘿嘿', 1, '2022-04-19 13:21:58', '2022-04-19 13:21:58', NULL);
COMMIT;

-- ----------------------------
-- Table structure for news_search
-- ----------------------------
DROP TABLE IF EXISTS `news_search`;
CREATE TABLE `news_search` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `number` int NOT NULL DEFAULT '1',
  `keywords` varchar(255) NOT NULL COMMENT '关键词',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of news_search
-- ----------------------------
BEGIN;
INSERT INTO `news_search` VALUES (3, 1, 2, '美女图片', '2022-03-15 14:17:54', '2022-03-15 16:03:34', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (6, 1, 4, '迪丽热巴', '2022-03-15 15:09:20', '2022-03-15 15:11:27', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (13, 1, 1, '范冰冰', '2022-03-15 15:22:47', '2022-03-15 15:22:47', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (16, 2, 12, '开课啦', '2022-03-15 15:48:29', '2022-03-15 15:48:35', NULL);
INSERT INTO `news_search` VALUES (18, 1, 6, '111路公交车路线', '2022-03-15 16:21:47', '2022-03-15 16:21:47', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (19, 1, 1, '佟亚丽', '2022-03-15 16:24:50', '2022-03-15 16:24:50', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (20, 1, 8, '小牛马是什么意思', '2022-03-15 16:26:16', '2022-04-17 11:20:37', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (21, 1, 1, '淘宝', '2022-04-16 18:50:41', '2022-04-16 18:50:41', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (22, 1, 1, '王丽坤个人资料', '2022-04-16 18:53:09', '2022-04-16 18:53:09', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (23, 1, 19, 'vue', '2022-04-16 19:20:29', '2022-04-17 12:59:15', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (24, 1, 1, 'vivo手机', '2022-04-16 19:27:58', '2022-04-16 19:27:58', '2022-04-17 13:24:07');
INSERT INTO `news_search` VALUES (35, 1, 1, 'vue', '2022-04-17 13:27:30', '2022-04-17 13:27:30', '2022-04-17 13:29:23');
INSERT INTO `news_search` VALUES (36, 1, 1, '芭比q了', '2022-04-17 13:28:27', '2022-04-17 13:28:27', '2022-04-17 13:29:23');
INSERT INTO `news_search` VALUES (37, 1, 3, '小傻瓜代表什么意思', '2022-04-17 13:30:11', '2022-04-17 13:31:49', '2022-04-17 13:36:05');
INSERT INTO `news_search` VALUES (38, 1, 1, '小鸟依人', '2022-04-17 13:31:10', '2022-04-17 13:31:10', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (39, 1, 1, '开课啦', '2022-04-17 13:31:56', '2022-04-17 13:31:56', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (40, 1, 1, '牛逼', '2022-04-17 13:33:43', '2022-04-17 13:33:43', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (41, 1, 1, '牛啊', '2022-04-17 13:34:19', '2022-04-17 13:34:19', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (42, 1, 1, '牛黄上清片', '2022-04-17 13:34:26', '2022-04-17 13:34:26', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (43, 1, 1, '小牛啊', '2022-04-17 13:34:40', '2022-04-17 13:34:40', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (44, 1, 1, '嘿嘿', '2022-04-17 13:35:34', '2022-04-17 13:35:34', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (45, 1, 1, '哈哈喵', '2022-04-17 13:36:14', '2022-04-17 13:36:14', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (46, 1, 1, '蚌埠', '2022-04-17 13:37:16', '2022-04-17 13:37:16', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (47, 1, 1, '娘娘腔', '2022-04-17 13:37:34', '2022-04-17 13:37:34', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (48, 1, 1, 'mm是什么单位的', '2022-04-17 13:37:40', '2022-04-17 13:37:40', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (49, 1, 1, 'ss', '2022-04-17 13:37:48', '2022-04-17 13:37:48', '2022-04-17 13:38:14');
INSERT INTO `news_search` VALUES (50, 1, 1, 'qq邮箱', '2022-04-17 13:37:59', '2022-04-17 13:37:59', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (51, 1, 1, 'qq', '2022-04-17 13:38:02', '2022-04-17 13:38:02', '2022-04-17 13:38:21');
INSERT INTO `news_search` VALUES (52, 1, 12, '开课啦', '2022-04-17 13:38:54', '2022-04-18 10:21:37', NULL);
INSERT INTO `news_search` VALUES (53, 1, 9, '小鸟依人', '2022-04-17 13:39:02', '2022-04-18 10:22:53', NULL);
INSERT INTO `news_search` VALUES (54, 1, 1, '黑海', '2022-04-17 13:44:22', '2022-04-17 13:44:22', '2022-04-17 13:44:54');
INSERT INTO `news_search` VALUES (55, 1, 5, 'lei', '2022-04-17 13:44:34', '2022-04-18 10:18:22', NULL);
INSERT INTO `news_search` VALUES (56, 1, 6, 'vue', '2022-04-17 13:58:24', '2022-04-18 11:05:57', NULL);
INSERT INTO `news_search` VALUES (57, 1, 1, 'vye', '2022-04-18 10:19:21', '2022-04-18 10:19:21', NULL);
INSERT INTO `news_search` VALUES (58, 1, 2, 'hhh', '2022-04-18 10:20:19', '2022-04-18 10:21:20', NULL);
INSERT INTO `news_search` VALUES (59, 1, 2, 'asa', '2022-04-18 10:21:47', '2022-04-18 10:22:58', NULL);
INSERT INTO `news_search` VALUES (60, 1, 2, '哈哈哈', '2022-04-18 10:49:45', '2022-04-18 10:49:51', NULL);
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `mark` varchar(60) DEFAULT NULL,
  `mark_name` varchar(60) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `action` varchar(60) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `state` tinyint(1) DEFAULT NULL,
  `authentication` tinyint(1) DEFAULT NULL,
  `authorization` tinyint(1) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES (3, '修改', 'user', '用户', '/api/admin/user', 'put', '', 1, 0, 0, '2022-02-20 17:46:29', '2022-02-20 18:01:22', NULL);
INSERT INTO `permission` VALUES (4, '删除', 'user', '用户', '/api/admin/user', 'delete', '', 1, 0, 0, '2022-02-20 17:47:00', '2022-02-20 17:47:00', NULL);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `is_default` tinyint(1) DEFAULT '0' COMMENT '是否默认角色 1 true ｜ 0 false',
  `status` tinyint(1) DEFAULT '0' COMMENT '是否默认角色 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, 'admin', 0, 1, '2022-02-11 13:42:49', '2022-02-17 16:06:11', NULL);
INSERT INTO `role` VALUES (22, '管理员5', 0, 1, '2022-02-16 14:31:21', '2022-02-16 19:01:54', NULL);
INSERT INTO `role` VALUES (64, '董事长', 0, 1, '2022-02-16 18:33:22', '2022-02-17 12:24:52', NULL);
INSERT INTO `role` VALUES (65, '经理', 0, 1, '2022-02-16 18:33:26', '2022-02-17 13:53:30', NULL);
INSERT INTO `role` VALUES (66, '秘书', 0, 1, '2022-02-16 18:33:31', '2022-03-01 11:39:05', NULL);
INSERT INTO `role` VALUES (67, '保安', 1, 1, '2022-02-16 18:33:35', '2022-03-09 18:36:50', NULL);
INSERT INTO `role` VALUES (72, '商家', 0, 1, '2022-04-14 08:28:39', '2022-04-14 08:28:41', NULL);
COMMIT;

-- ----------------------------
-- Table structure for role_menu
-- ----------------------------
DROP TABLE IF EXISTS `role_menu`;
CREATE TABLE `role_menu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL,
  `menu_id` int DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `role_menu_role_id_menu_id_unique` (`role_id`,`menu_id`),
  KEY `menu_id` (`menu_id`),
  CONSTRAINT `role_menu_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_menu_ibfk_2` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of role_menu
-- ----------------------------
BEGIN;
INSERT INTO `role_menu` VALUES (1, 22, 4, '2022-02-21 12:52:42', '2022-02-21 12:58:55', NULL);
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL,
  `permission_id` int DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `role_permission_role_id_permission_id_unique` (`role_id`,`permission_id`),
  KEY `permission_id` (`permission_id`),
  CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES (5, 64, 3, '2022-02-20 18:28:45', '2022-02-20 18:28:45', NULL);
INSERT INTO `role_permission` VALUES (7, 1, 3, '2022-02-20 18:39:52', '2022-02-20 18:39:52', NULL);
INSERT INTO `role_permission` VALUES (8, 22, 3, '2022-02-20 18:40:03', '2022-02-20 18:40:03', NULL);
INSERT INTO `role_permission` VALUES (11, 67, 3, '2022-02-20 18:45:44', '2022-02-20 18:45:44', NULL);
INSERT INTO `role_permission` VALUES (12, 67, 4, '2022-02-20 18:45:44', '2022-02-20 18:45:44', NULL);
COMMIT;

-- ----------------------------
-- Table structure for setting
-- ----------------------------
DROP TABLE IF EXISTS `setting`;
CREATE TABLE `setting` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '久爱cms',
  `keywords` varchar(255) NOT NULL DEFAULT '久爱cms',
  `description` varchar(255) NOT NULL DEFAULT '久爱cms',
  `url` varchar(255) NOT NULL DEFAULT 'www.i6i8.cn',
  `logo` varchar(255) NOT NULL DEFAULT 'www.i6i8.cn/images/logo.png',
  `stutas` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` bigint DEFAULT NULL,
  `password` varchar(255) NOT NULL COMMENT '密码',
  `paypassword` varchar(255) NOT NULL DEFAULT '000000' COMMENT '支付密码',
  `introduce` varchar(255) DEFAULT '' COMMENT '个人介绍',
  `avatar` text NOT NULL COMMENT '头像',
  `is_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为管理 1 true ｜ 0 false',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_name` (`user_name`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=222 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'admin', 'admin', '8778800988@qq.com', 18684868153, '$2a$10$l/y1z.lnWzrXP6rgQehkS.Qt/1cuTfXrdsddVq2Cp0MWn/zRFfHF6', '$2a$10$3VASh4.s1qXqBCGivjqS5ekug4YFBPjixo8zsjgNZ4Uc17wIShANG', '时间过得很快，不记录很难回忆起来', 'http://127.0.0.1:8001/public/upload/20220422/1650604284430.png', 1, 1, '2022-02-11 13:43:02', '2022-04-22 13:11:24', NULL);
INSERT INTO `user` VALUES (2, 'admin2', 'admin2', '877880098@qq.com', NULL, '$2a$10$Bg9Eks.OozDoNMBvhTpCPunTfBx52ju1ZqXtWKvZGG9yrt3mx2fne', '000000', '手插口袋，谁都不爱', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F69%2F80%2F595f67c042c1b_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1646882977&t=3869fe11f1cb5696db1f35c55eb1a6c8', 1, 1, '2022-02-11 14:17:36', '2022-03-18 15:25:42', NULL);
INSERT INTO `user` VALUES (7, 'admin92', 'admin92', '877880011113@qq.com', 186848681531, '$2a$10$UBAwRSqSIeBy51K7MvrjO.Whg7fzyymBJZmBw1lEfAZjAj5ZkQbWa', '$2a$10$qD7wd8ZW.GpTszsAlMTg1ur03ePpJCL9MserP1ja4g1d.U9Hb8Q6G', '', 'https://portrait.gitee.com/uploads/avatars/user/3178/9534923_china-quanda_1627964208.png!avatar60', 1, 1, '2022-02-16 12:23:06', '2022-02-19 23:49:31', NULL);
INSERT INTO `user` VALUES (50, 'admin00', 'admin00', '18684868153@qq.com', NULL, '$2a$10$i2IHc2LlMO0Z5Ar.S4X6qulyUSBKdTyJaRA0PEkbXFDG03.o93U3i', '123456', '', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F69%2F80%2F595f67c042c1b_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1646882977&t=3869fe11f1cb5696db1f35c55eb1a6c8', 1, 1, '2022-02-24 09:12:33', '2022-02-24 09:12:33', NULL);
INSERT INTO `user` VALUES (220, '18684868154@qq.com', '18684868154@qq.com', '18684868154@qq.com', NULL, 'www.i6i8.cn', '123456', '', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F69%2F80%2F595f67c042c1b_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1646882977&t=3869fe11f1cb5696db1f35c55eb1a6c8', 0, 1, '2022-04-04 11:48:33', '2022-04-04 11:48:33', NULL);
INSERT INTO `user` VALUES (221, '18684868151@qq.com', '18684868151@qq.com', '18684868151@qq.com', NULL, '$2a$10$kZQVo.vpajlN1sE3Pb2oAeqin2w4dAbvmAemxcxL/Nu0h8tMAyeLa', '123456', '', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F69%2F80%2F595f67c042c1b_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1646882977&t=3869fe11f1cb5696db1f35c55eb1a6c8', 0, 1, '2022-04-04 11:55:20', '2022-04-04 13:01:29', NULL);
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_role_user_id_role_id_unique` (`user_id`,`role_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `user_role_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `user_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES (2, 7, 22, '2022-02-20 16:16:23', '2022-02-20 16:49:42', NULL);
INSERT INTO `user_role` VALUES (3, 2, 1, '2022-02-20 16:39:03', '2022-02-20 16:39:03', NULL);
INSERT INTO `user_role` VALUES (4, 2, 22, '2022-02-20 17:06:20', '2022-02-20 17:06:20', NULL);
INSERT INTO `user_role` VALUES (5, 1, 66, '2022-02-20 17:07:00', '2022-02-20 17:07:00', NULL);
INSERT INTO `user_role` VALUES (6, 1, 64, '2022-02-20 17:07:00', '2022-02-20 17:07:00', NULL);
INSERT INTO `user_role` VALUES (7, 1, 65, '2022-02-20 17:07:00', '2022-02-20 17:07:00', NULL);
INSERT INTO `user_role` VALUES (11, 50, 67, '2022-02-24 09:12:33', '2022-02-24 09:12:33', NULL);
INSERT INTO `user_role` VALUES (118, 220, 67, '2022-04-04 11:48:33', '2022-04-04 11:48:33', NULL);
INSERT INTO `user_role` VALUES (119, 221, 67, '2022-04-04 11:55:20', '2022-04-04 11:55:20', NULL);
COMMIT;

-- ----------------------------
-- Table structure for verifyCode
-- ----------------------------
DROP TABLE IF EXISTS `verifyCode`;
CREATE TABLE `verifyCode` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account` varchar(255) NOT NULL COMMENT '要验证的账户',
  `code` bigint NOT NULL COMMENT '验证码',
  `number` bigint NOT NULL DEFAULT '1' COMMENT '获取验证码的次数',
  `type` tinyint NOT NULL COMMENT '类型(1:手机;2:邮箱;)',
  `stutas` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已验证成功 1 true ｜ 0 false',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of verifyCode
-- ----------------------------
BEGIN;
INSERT INTO `verifyCode` VALUES (17, '18684868151@qq.com', 433860, 2, 2, 0, '2022-04-04 12:58:20', '2022-04-04 13:01:13', NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
